Add a helper for one-shot framing-format decompression
This commit is contained in:
parent
80cff583e3
commit
b1726ab7e7
|
@ -96,6 +96,11 @@ proc framing_format_uncompress*(input: InputStream, output: OutputStream) =
|
||||||
|
|
||||||
output.flush()
|
output.flush()
|
||||||
|
|
||||||
|
proc framingFormatUncompress*(input: openarray[byte]): seq[byte] =
|
||||||
|
var output = memoryOutput()
|
||||||
|
framing_format_uncompress memoryInput(input), output
|
||||||
|
return output.getOutput
|
||||||
|
|
||||||
proc processFrame*(output: OutputStream, dst: var openArray[byte], src: openArray[byte]) =
|
proc processFrame*(output: OutputStream, dst: var openArray[byte], src: openArray[byte]) =
|
||||||
let
|
let
|
||||||
crc = masked_crc32c(src[0].unsafeAddr, src.len.uint)
|
crc = masked_crc32c(src[0].unsafeAddr, src.len.uint)
|
||||||
|
|
Loading…
Reference in New Issue