1
1
mirror of https://github.com/wader/fq.git synced 2024-09-19 15:57:29 +03:00
fq/pkg/bitio
2022-02-05 16:54:54 +01:00
..
bitio.go bitio: Cleanup documentation a bit 2022-02-05 16:54:54 +01:00
buffer.go bitio: Cleanup documentation a bit 2022-02-05 16:54:54 +01:00
iobitreadseeker.go bitio,decode: Refactor bitio usage and make buffer slicing more correct 2022-02-04 21:41:53 +01:00
iobitwriter.go bitio: Cleanup documentation a bit 2022-02-05 16:54:54 +01:00
ioreader.go bitio: Cleanup documentation a bit 2022-02-05 16:54:54 +01:00
ioreadseeker_test.go bitio: Cleanup documentation a bit 2022-02-05 16:54:54 +01:00
ioreadseeker.go bitio: Cleanup documentation a bit 2022-02-05 16:54:54 +01:00
limitreader.go bitio: Cleanup documentation a bit 2022-02-05 16:54:54 +01:00
multireader.go bitio: Cleanup documentation a bit 2022-02-05 16:54:54 +01:00
README.md bitio,decode: Refactor bitio usage and make buffer slicing more correct 2022-02-04 21:41:53 +01:00
readwrite64_test.go bitio,decode: Refactor bitio usage and make buffer slicing more correct 2022-02-04 21:41:53 +01:00
readwrite64.go bitio,decode: Refactor bitio usage and make buffer slicing more correct 2022-02-04 21:41:53 +01:00
reversebytes64_test.go bitio,decode: Refactor bitio usage and make buffer slicing more correct 2022-02-04 21:41:53 +01:00
reversebytes64.go bitio: Cleanup documentation a bit 2022-02-05 16:54:54 +01:00
sectiontreader.go bitio: Cleanup documentation a bit 2022-02-05 16:54:54 +01:00

The bitio package tries to mimic the standard library packages io and bytes as much as possible.

  • bitio.Buffer same as bytes.Buffer
  • bitio.IOBitReadSeeker is a bitio.ReaderAtSeeker that from a io.ReadSeeker
  • bitio.IOBitWriter a bitio.BitWriter that write bytes to a io.Writer, use Flush() to write possible unaligned byte
  • bitio.IOReader is a io.Reader that reads bytes from a bit reader, will zero pad on unaligned byte eof
  • bitio.IOReadSeeker is a io.ReadSeeker that read/seek bytes in a bit stream, will zero pad on unaligned - bitio.NewBitReader same as bytes.NewReader
  • bitio.LimitReader same as io.LimitReader
  • bitio.MultiReader same as io.MultiReader
  • bitio.SectionReader same as io.SectionReader
  • bitio.Copy* same as io.Copy*
  • bitio.ReadFull same as io.ReadFull

TODO:

  • bitio.IOBitReader bitio.Reader that reads from a io.Reader
  • bitio.IOBitWriteSeeker bitio.BitWriteSeeker that writes to a io.WriteSeeker
  • bitio.CopyN
  • speed up read by using a cache somehow ([]byte or just a uint64?)