diff options
author | pacien | 2018-11-24 01:02:53 +0100 |
---|---|---|
committer | pacien | 2018-11-24 01:02:53 +0100 |
commit | 7c48f80fd8d81ec7c0b9e504174b05892248380a (patch) | |
tree | 95fcddbd33febfb516514570c03232ce13a48ecc /src | |
parent | 55c305c13850190776d84b593e305bf070a7db0e (diff) | |
download | gziplike-7c48f80fd8d81ec7c0b9e504174b05892248380a.tar.gz |
Add last streamblock flag accessor
Diffstat (limited to 'src')
-rw-r--r-- | src/streamblock.nim | 3 |
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 | ||
37 | proc isLast*(streamBlock: StreamBlock): bool = | ||
38 | streamBlock.last | ||
39 | |||
37 | proc readSerialised*(bitReader: BitReader): StreamBlock = | 40 | proc 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 |