aboutsummaryrefslogtreecommitdiff
path: root/bitreader.go
diff options
context:
space:
mode:
authorArda Serdar Pektezol <1669855+BiSaXa@users.noreply.github.com>2022-09-11 10:39:11 +0300
committerGitHub <noreply@github.com>2022-09-11 10:39:11 +0300
commitdefb067368f8031ed59d720f6fb44e6770db7cea (patch)
treec82e3562990365cfe54b3f55e56847c22b9a05ee /bitreader.go
parentMerge pull request #2 from BiSaXa/dev (diff)
parentslight change for go doc (diff)
downloadbitreader-1.1.1.tar.gz
bitreader-1.1.1.tar.bz2
bitreader-1.1.1.zip
Merge pull request #3 from BiSaXa/devv1.1.1
changed readme for new version and slight change for go doc
Diffstat (limited to 'bitreader.go')
-rw-r--r--bitreader.go13
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
18type ReaderType struct { 23type 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