new .rod file implementation; part 1: writing of the file
This commit is contained in:
parent
89782460a3
commit
f3b8d92216
8 changed files with 594 additions and 8 deletions
|
|
@ -67,6 +67,8 @@ proc decodeStr*(s: cstring, pos: var int): string =
|
|||
const
|
||||
chars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||
|
||||
{.push overflowChecks: off.}
|
||||
|
||||
# since negative numbers require a leading '-' they use up 1 byte. Thus we
|
||||
# subtract/add `vintDelta` here to save space for small negative numbers
|
||||
# which are common in ROD files:
|
||||
|
|
@ -131,6 +133,8 @@ proc decodeVInt*(s: cstring, pos: var int): int =
|
|||
proc decodeVBiggestInt*(s: cstring, pos: var int): BiggestInt =
|
||||
decodeIntImpl()
|
||||
|
||||
{.pop.}
|
||||
|
||||
iterator decodeVIntArray*(s: cstring): int =
|
||||
var i = 0
|
||||
while s[i] != '\0':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue