Skip to content

katzarsky/BitStream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

BitStream

About

Bit stream codec implementation in ActionScript3 (BitStream.as is the codec). Faciliates creation of a binary string that consist of arbitrary-bit-length items. (De)Serializes into ByteArray.

  • Can be used in variety of home-made binary codecs.
  • Can be used with Base64 codec to send the encoded binary string over JSON, HTTP or other non-binary transport.

Features:

  • writeBits 1...32 bits in length.
  • readBits 1...32 bits in length.
  • saveByteArray - aligns to 32bit word. Pads with zeroes.
  • loadByteArray

TODO

  • writeSignedBits(-30, 6) - one bit (leftmost) for the sign(negative=1, positive=0), then encodes the number in N-1 bits

License

MIT, see LICENSE file.

About

Bit stream implementation. Written in ActionScript (AS3).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published