TranscodingStreams.jl icon indicating copy to clipboard operation
TranscodingStreams.jl copied to clipboard

Allow generic `DenseVector{UInt8}` as input/output

Open eschnett opened this issue 6 months ago • 2 comments

I want to compress data that is not of the type Vector{UInt8}, but instead has the more complicated type Base.ReinterpretArray{UInt8, 1, Float64, Vector{Float64}, false}. This is still a 1-d array with UInt8 elements, and as such the codecs would not care about the difference.

Julia has the type DenseVector to describe arrays that are stored contiguously. It would be nice if you could update the API to allow DenseVectors instead of just Vectors.

eschnett avatar May 30 '25 16:05 eschnett

The encode function in https://github.com/JuliaIO/ChunkCodecs.jl supports this.

But it would be good to have support for some of the ChunkCodec interface in this package as well.

nhz2 avatar May 30 '25 17:05 nhz2

Thanks! I'm using that package now.

eschnett avatar May 30 '25 19:05 eschnett