Skip to content
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

Closed
Moelf opened this issue Feb 26, 2023 · 2 comments
Closed

universal in-place decompression interface #132

Moelf opened this issue Feb 26, 2023 · 2 comments

Comments

@Moelf
Copy link

Moelf commented Feb 26, 2023

by "in-place" I mean the user would pre-allocate a Vector{UInt8} or something as the sink

sometimes 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.

@Moelf Moelf changed the title universal in-place interface universal in-place decompression interface Feb 26, 2023
@svilupp
Copy link

svilupp commented Mar 9, 2023

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)?

mkitti added a commit that referenced this issue Apr 9, 2023
…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 <mkitti@users.noreply.github.com>

* new copydata! method

* reassociate docstring with correct method

* Expand ByteData

Co-authored-by: Mark Kittisopikul <mkitti@users.noreply.github.com>

* Expand ByteData

Co-authored-by: Mark Kittisopikul <mkitti@users.noreply.github.com>

* Expand ByteData

Co-authored-by: Mark Kittisopikul <mkitti@users.noreply.github.com>

* clarify formatting

* formatting

* Generic args

Co-authored-by: Joao Aparicio <jpmn.aparicio@gmail.com>

* Generic args

Co-authored-by: Joao Aparicio <jpmn.aparicio@gmail.com>

* 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 <mkitti@users.noreply.github.com>
Co-authored-by: Joao Aparicio <jpmn.aparicio@gmail.com>
@mkitti
Copy link
Member

mkitti commented Apr 11, 2023

Closed by #132 and released as 0.9.12

@mkitti mkitti closed this as completed Apr 11, 2023
bauglir added a commit to bauglir/TranscodingStreams.jl that referenced this issue Apr 14, 2023
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants