• Effekt Logo Effekt Library
    • bytestream
      • BE
      • LE
      • OfWidth
      • Signed
      • Bit
        • B0
        • B1
      • not
      • HexSplices
      • bytesLE
      • bytesLE
      • bytesBE
      • bytesBE
      • signedBytesLE
      • signedBytesBE
      • signedBytesLE
      • signedBytesBE
      • hex
      • x
      • bitsLE
      • bitsBE
      • bitsLE
      • bitsBE
      • bitsBE
      • collectBitsBE
      • ungroupBytesBE
      • twoscomplementLE
      • groupBytesBE
      • groupBytesLE
      • BitSplices
      • bit
    • bytestream
    • Jump to source: libraries/common/bytestream.effekt
      Example usage: examples/stdlib/bytestream
      • BE [A] (raw: A)
      • A with explicit big-endian order
      • LE [A] (raw: A)
      • A with explicit little-endian order
      • OfWidth [A] (raw: A, width: Int)
      • A with explicit width in current unit
        (bits for bitstreams, bytes for bytestreams)
      • Signed [A] (raw: A)
      • explicitly signed A
      • Bit
      • Bits
        • B0
        • B1
      • not (b: Bit): Bit / {}
      • not on Bits
      • HexSplices
      • Splices allowed in hex/byte stream literals
      • bytesLE (int: Int, w: Int): Unit / {emit[Byte]}
      • emit bytes of the given int as a w bytes in little-endian byte order
      • bytesLE (int: Int): Unit / {emit[Byte]}
      • emit bytes of the given int as a 4 bytes in little-endian byte order
      • bytesBE (n: Int, width: Int): Unit / {emit[Byte]}
      • emit bytes of the given int as a w bytes in big-endian byte order
      • bytesBE (n: Int): Unit / {emit[Byte]}
      • emit bytes of the given int as a 4 bytes in big-endian byte order
      • signedBytesLE (int: Int, width: Int): Unit / {emit[Byte]}
      • emit bytes of the given int as width bytes (in 2s-complement) in little-endian byte order
      • signedBytesBE (int: Int, width: Int): Unit / {emit[Byte]}
      • emit bytes of the given int as width bytes (in 2s-complement) in big-endian byte order
      • signedBytesLE (int: Int): Unit / {emit[Byte]}
      • emit bytes of the given int as 4 bytes (in 2s-complement) in little-endian byte order
      • signedBytesBE (int: Int): Unit / {emit[Byte]}
      • emit bytes of the given int as 4 bytes (in 2s-complement) in big-endian byte order
      • hex { body: => Unit / {write, HexSplices} }: Unit / {emit[Byte]}
      • Splicer to emit the bytes in hex notation given, plus eventual splices
        Ignores whitespace
      • x { body: => Unit / {write, HexSplices} }: Int / {}
      • convert the given hex notation to an integer (big-endian)
      • bitsLE (byte: Byte): Unit / {emit[Bit]}
      • emit bits of the given Byte as 8 Bits in little-endian bit order
      • bitsBE (byte: Byte): Unit / {emit[Bit]}
      • emit bits of the given Byte as 8 Bits in big-endian bit order
      • bitsLE (v: Int, width: Int): Unit / {emit[Bit]}
      • emit bits of the given Byte as width Bits in little-endian bit order
      • bitsBE (v: Int, width: Int): Unit / {emit[Bit]}
      • emit bits of the given int as width Bits in big-endian bit order
      • bitsBE (int: Int): Unit / {emit[Bit]}
      • emit bits of the given int as 32 Bits in big-endian bit order
      • collectBitsBE { body: => Unit / {emit[Bit]} }: Int / {}
      • collect bits in big-endian bit order into an Int
      • ungroupBytesBE { body: => Unit / {emit[Byte]} }: Unit / {emit[Bit]}
      • split emitted bytes and emit the individual bits in big-endian bit order
      • twoscomplementLE { body: => Unit / {emit[Bit]} }: Unit / {emit[Bit]}
      • streaming negation in 2s-complement for little-endian bitstreams
      • groupBytesBE { body: => Unit / {emit[Bit]} }: Unit / {emit[Byte]}
      • group 8 bits into a byte each, big-endian bit order.
        NOTE: The remainder is dropped.
      • groupBytesLE { body: => Unit / {emit[Bit]} }: Unit / {emit[Byte]}
      • group 8 bits into a byte each, little-endian bit order.
        NOTE: The remainder is dropped.
      • BitSplices
      • Splices allowed in bit stream literals
      • bit { body: => Unit / {write, BitSplices} }: Unit / {emit[Bit]}
      • Splicer to emit the bits in binary notation given, plus evenutal splices
        Ignores whitespace