diff options
| author | BiSaXa <1669855+BiSaXa@users.noreply.github.com> | 2022-09-11 10:37:54 +0300 |
|---|---|---|
| committer | BiSaXa <1669855+BiSaXa@users.noreply.github.com> | 2022-09-11 10:37:54 +0300 |
| commit | 1c7fe6c4047b137b9513a35c0db0c4b3380a5041 (patch) | |
| tree | 777be3c0b9a30d867750efade8e88718259b3f45 | |
| parent | changed readme for new version (diff) | |
| download | bitreader-1c7fe6c4047b137b9513a35c0db0c4b3380a5041.tar.gz bitreader-1c7fe6c4047b137b9513a35c0db0c4b3380a5041.tar.bz2 bitreader-1c7fe6c4047b137b9513a35c0db0c4b3380a5041.zip | |
slight change for go doc
| -rw-r--r-- | bitreader.go | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/bitreader.go b/bitreader.go index 3fbc221..a56aab8 100644 --- a/bitreader.go +++ b/bitreader.go | |||
| @@ -15,11 +15,16 @@ import ( | |||
| 15 | 15 | ||
| 16 | // ReaderType is the main structure of our Reader. | 16 | // ReaderType is the main structure of our Reader. |
| 17 | // Whenever index == 0, we need to read a new byte from stream into curByte | 17 | // Whenever index == 0, we need to read a new byte from stream into curByte |
| 18 | // | ||
| 19 | // stream io.Reader The underlying stream we're reading bytes from | ||
| 20 | // index uint18 The current index into the byte [0-7] | ||
| 21 | // curByte byte The byte we're currently reading from | ||
| 22 | // le bool Whether to read in little-endian order | ||
| 18 | type ReaderType struct { | 23 | type ReaderType struct { |
| 19 | stream io.Reader // The underlying stream we're reading bytes from | 24 | stream io.Reader |
| 20 | index uint8 // The current index into the byte [0-7] | 25 | index uint8 |
| 21 | curByte byte // The byte we're currently reading from | 26 | curByte byte |
| 22 | le bool // Whether to read in little-endian order | 27 | le bool |
| 23 | } | 28 | } |
| 24 | 29 | ||
| 25 | // Reader is the main constructor that creates the ReaderType object | 30 | // Reader is the main constructor that creates the ReaderType object |