You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
producing binary output using staticExec can get corrupted if the last byte of the binary data happens to be 0xA (LF)
Example
const compressed =staticExec("gzip -9 -c test.dat")
# compressed.len can be one byte short in case compressed data happens to end with 0xA# which was in fact the case for a little file I created
Possible Solution
I understand how removing the trailing newline may be convenient in textual cases. Perhaps staticExec could optionally take a flag indicating that the output is binary, or make a new magic function that doesn't chop the LF.
$ nim -v
Nim Compiler Version 1.0.6 [Linux: amd64]
Compiled at 2020-01-23
Copyright (c) 2006-2019 by Andreas Rumpf
active boot switches: -d:release
The text was updated successfully, but these errors were encountered:
producing binary output using staticExec can get corrupted if the last byte of the binary data happens to be 0xA (LF)
Example
Possible Solution
The text was updated successfully, but these errors were encountered: