aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpacien2018-11-24 01:02:53 +0100
committerpacien2018-11-24 01:02:53 +0100
commit7c48f80fd8d81ec7c0b9e504174b05892248380a (patch)
tree95fcddbd33febfb516514570c03232ce13a48ecc /src
parent55c305c13850190776d84b593e305bf070a7db0e (diff)
downloadgziplike-7c48f80fd8d81ec7c0b9e504174b05892248380a.tar.gz
Add last streamblock flag accessor
Diffstat (limited to 'src')
-rw-r--r--src/streamblock.nim3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/streamblock.nim b/src/streamblock.nim
index 49c3dcd..403687e 100644
--- a/src/streamblock.nim
+++ b/src/streamblock.nim
@@ -34,6 +34,9 @@ type StreamBlock* = object
34 else: 34 else:
35 discard 35 discard
36 36
37proc isLast*(streamBlock: StreamBlock): bool =
38 streamBlock.last
39
37proc readSerialised*(bitReader: BitReader): StreamBlock = 40proc readSerialised*(bitReader: BitReader): StreamBlock =
38 result.last = bitReader.readBool() 41 result.last = bitReader.readBool()
39 result.kind = bitReader.readBits(2, uint8).BlockKind 42 result.kind = bitReader.readBits(2, uint8).BlockKind