Giter Club home page Giter Club logo

codecxz.jl's People

Contributors

bicycle1885 avatar dependabot[bot] avatar jakobnissen avatar joaoaparicio avatar juliatagbot avatar nhz2 avatar ranocha avatar sjkelly avatar staticfloat avatar viralbshah avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

codecxz.jl's Issues

Inconsistency with CodecGzip/CodecBzip2?

I'm using the following code using CodecXz and CodecGzip/Bzip2 (slightly simplified):

function open_xz(f::Function, filename::String, mode::String)
    return if mode == "w"
        Base.open(f, CodecXz.XzDecompressorStream, filename, mode)
    elseif mode == "r"
        Base.open(f, CodecXz.XzCompressorStream, filename, mode)
    end
end

function open_bz2(f::Function, filename::String, mode::String)
    return if mode == "w"
        Base.open(f, CodecBzip2.Bzip2CompressorStream, filename, mode)
    elseif mode == "r"
        Base.open(f, CodecBzip2.Bzip2DecompressorStream, filename, mode)
    end
end

However similar, though, the two codes do not behave the same. When creating a new file, with mode="w", the Bzip2/Gz code works, but not the Xz one. It fails with the following error:

lzma error: code = 7
  Stacktrace:
   [1] changemode!(::TranscodingStreams.TranscodingStream{XzDecompressor,IOStream}, ::Symbol) at C:\Users\Thibaut\.julia\packages\TranscodingStreams\MsN8d\src\stream.jl:717
   [2] callprocess(::TranscodingStreams.TranscodingStream{XzDecompressor,IOStream}, ::TranscodingStreams.Buffer, ::TranscodingStreams.Buffer) at C:\Users\Thibaut\.julia\packages\TranscodingStreams\MsN8d\src\stream.jl:649
   [3] flushbuffer(::TranscodingStreams.TranscodingStream{XzDecompressor,IOStream}, ::Bool) at C:\Users\Thibaut\.julia\packages\TranscodingStreams\MsN8d\src\stream.jl:594
   [4] flushbufferall at C:\Users\Thibaut\.julia\packages\TranscodingStreams\MsN8d\src\stream.jl:601 [inlined]
   [5] changemode!(::TranscodingStreams.TranscodingStream{XzDecompressor,IOStream}, ::Symbol) at C:\Users\Thibaut\.julia\packages\TranscodingStreams\MsN8d\src\stream.jl:740
   [6] close(::TranscodingStreams.TranscodingStream{XzDecompressor,IOStream}) at C:\Users\Thibaut\.julia\packages\TranscodingStreams\MsN8d\src\stream.jl:174
   [7] open(::MathOptFormat.var"##7#8"{MathOptFormat.MPS.InnerModel{Float64}}, ::Type{TranscodingStreams.TranscodingStream{XzDecompressor,S} where S<:IO}, ::String, ::String) at C:\Users\Thibaut\.julia\packages\TranscodingStreams\MsN8d\src\stream.jl:163
   [8] _compressed_open at C:\Users\Thibaut\.julia\dev\MathOptFormat\src\compression.jl:55 [inlined]

Here is my version of Julia:

julia> versioninfo()
Julia Version 1.3.0-rc2.0
Commit a04936e3e0 (2019-09-12 19:49 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.1 (ORCJIT, skylake)

As this code works for Bzip2 and Gz, I suppose the problem lies with Xz.

thank you

Not a bug or issue, but I just wanted to say thank you for this package!

For reference, I read a compressed csv file as such:

using CodecXz, Queryverse
df = open(XzDecompressorStream, filename) do stream
    DataFrame(load(Stream(format"CSV", stream)))
end

Thanks again!
cheers
(feel free to close ;)

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.