Module streamhelper

Reads a network-order int32. The default reads everything in little-endian, which is maddening.

Procs

proc read(s: Stream; length: int): string {.raises: [Exception, IOError],
                                      tags: [ReadIOEffect].}
proc readUint8(s: Stream): uint8 {.raises: [Exception, IOError], tags: [ReadIOEffect].}
proc readNInt32(s: Stream): int32 {.inline, raises: [Exception, IOError],
                                tags: [ReadIOEffect].}
proc writeNInt32(s: Stream; val: uint32) {.inline, raises: [Exception],
                                      tags: [WriteIOEffect].}