-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
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
universal in-place decompression interface #132
Comments
I've drafted a PR around Buffers to support faster decompression when loading Arrow files. Would that support your use case as well? Or would you need the sink to be ByteData (instead of buffer)? |
…transcode (#136) * allow users to optionally provide an output buffer when calling transcode * add tests and refactor docstring * nicer formating Co-authored-by: Mark Kittisopikul <[email protected]> * new copydata! method * reassociate docstring with correct method * Expand ByteData Co-authored-by: Mark Kittisopikul <[email protected]> * Expand ByteData Co-authored-by: Mark Kittisopikul <[email protected]> * Expand ByteData Co-authored-by: Mark Kittisopikul <[email protected]> * clarify formatting * formatting * Generic args Co-authored-by: Joao Aparicio <[email protected]> * Generic args Co-authored-by: Joao Aparicio <[email protected]> * small fixes * simplify * fix buffer * fix * formatting * fix buffer * Address PR comment #136 (comment) * Address PR comment #136 (comment) * Address PR review #136 (comment) #136 (comment) * dont use isnothing * add doc-string * replace keepbytes with marginpos * fix typeo --------- Co-authored-by: Mark Kittisopikul <[email protected]> Co-authored-by: Joao Aparicio <[email protected]>
Closed by #132 and released as 0.9.12 |
The examples in many of the codec packages rely on being able to call `transcode` providing a `Codec` type and a string[^1][^2]. JuliaIO#132 removed type annotations from the trailing arguments for `transcode(::Type{C}, ...) where {C<:Codec}` causing a method ambiguity with `transcode(T, src::String)` in Julia `Base`[^3]. This adds an additional method to `Base.transcode` to resolve this ambiguity. Fixes JuliaIO#139. [^1]: https://github.com/JuliaIO/CodecZlib.jl/tree/f9fddaa28c093c590a7a93358709df2945306bc7#usage [^2]: https://github.com/JuliaIO/CodecZstd.jl/tree/6327ffa9a3a12fc46d465dcfc8b30bed91cf284b#usage [^3]: https://github.com/JuliaLang/julia/blob/ff7b8eb00bf887f20bf57fb7e53be0070a242c07/base/c.jl#L306
I'm reopening this issue because I think there are some issues to work on with the current interface.
|
somehow I miseed @mkitti 's original comment since the "closed by" refer to this very issue, what was the PR that supposedly fixed this? |
this can't work directly, the two possibilities are you have a Or, you have |
Yes, I think this would require a new |
Also, a general |
@Moelf @mkitti I have a draft interface for in-place encoding and decoding defined in https://github.com/nhz2/ChunkCodecs.jl/blob/main/ChunkCodecCore/src/interface.jl The interface currently doesn't directly use pointers, which is nice for avoiding GC issues, but sometimes things don't work as expected, for example decoding a view of a PyArray: JuliaPy/PythonCall.jl#579 |
That's interesting. I will try to take a closer look next week. |
by "in-place" I mean the user would pre-allocate a
Vector{UInt8}
or something as the sinksometimes decompression is needed for low-level stuff, such as handling "buffers" in a file spec, and multiple decompression together assemble the entire data blob.
it would be nice if there's a in-place interface that support multiple algorithms through this central package.
The text was updated successfully, but these errors were encountered: