Skip to content

BitReader v1.4.3

Latest
Compare
Choose a tag to compare
@pektezol pektezol released this 16 Sep 11:00

v1.4.3 Full Release of github.com/pektezol/bitreader

The simplest bit reader with big/little-endian support for Golang.

  • Changed the TryRead functions to specify signed and unsigned versions. (Breaks major release, but no one cares lol)
  • Changed constructor function name to NewReader, also added NewReaderFromBytes to construct with a byte slice.
  • Changed ReadStringLen to ReadStringLength, its 2023, don't be concise(?)
  • Changed the Reader type name from ReaderType to Reader.
  • Changed Reader type's field names to be less concise.
  • Changed TryReadString and TryReadStringLength to panic when there's an error.
  • Changed ReadString and ReadStringLength to properly read unicode text.
  • Added new function: Fork, which copies the reader with all of its properties.
  • Added new function: ReadRemainingBits, which returns the total number of bits left in the stream, without messing with it. (Done via Forking)
  • Fixed bug where SkipBits didn't work as intended for bits < 8. Previously, it prematurely returned an EOF.
  • Fixed being able to enter negative bit numbers in the function parameters.
  • Reworked unit tests for new and changed functions. Currently has an %83.6 coverage.

Breaks the major version, but will release this in a minor version. What are you going to do about it?