We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MWE:
using CodecBzip2: transcode, Bzip2Compressor, Bzip2Decompressor function main() # generate some data input = Pipe() output = Pipe() cmd = `bzip2` proc = run(pipeline(cmd, stdout=output, stdin=input); wait=false) close(output.in) writer = @async begin write(input, "Hello, world!") close(input) end reader = @async read(output) wait(proc) compressed = fetch(reader) # add some padding push!(compressed, 0) # verify we can decompress using `bunzip2` mktempdir() do dir path = joinpath(dir, "test.bz2") write(path, compressed) run(`bunzip2 $path`) println(read(joinpath(dir, "test"), String)) end uncompressed = transcode(Bzip2Decompressor, compressed) String(uncompressed) end
The bunzip2 tool generates a warning, but continues to decompress:
bunzip2
bunzip2: /var/folders/5m/zq0fq7r91f7_5qb1c31vgy5h0000gn/T/jl_B16lhs/test.bz2: trailing garbage after EOF ignored Hello, world!
CodecBzip2.jl fails:
ERROR: CodecBzip2.BZ2Error(-5)
... where -5 seems to be BZ_DATA_ERROR_MAGIC.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
MWE:
The
bunzip2
tool generates a warning, but continues to decompress:CodecBzip2.jl fails:
... where -5 seems to be BZ_DATA_ERROR_MAGIC.
The text was updated successfully, but these errors were encountered: