Skip to content

Commit 7051c32

Browse files
authored
Merge branch 'master' into mkitti-v3-prototype
2 parents 646ba9c + 8a5ea8c commit 7051c32

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

Project.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ version = "0.9.4"
77
AWSS3 = "1c724243-ef5b-51ab-93f4-b0a88ac62a95"
88
Blosc = "a74b3585-a348-5f62-a45c-50e91977d574"
99
CRC32c = "8bf52ea8-c179-5cab-976a-9e18b702a9bc"
10+
ChunkCodecCore = "0b6fb165-00bc-4d37-ab8b-79f91016dbe1"
1011
ChunkCodecLibZstd = "55437552-ac27-4d47-9aa3-63184e8fd398"
1112
CodecZlib = "944b1d66-785c-5afd-91f1-9de20f533193"
1213
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
@@ -24,8 +25,9 @@ ZipArchives = "49080126-0e18-4c2a-b176-c102e4b3760c"
2425
[compat]
2526
AWSS3 = "0.10, 0.11"
2627
Blosc = "0.5, 0.6, 0.7"
27-
CRC32c = "1.11.0"
28-
ChunkCodecLibZstd = "0.1.1"
28+
CRC32c = "1.10, 1.11"
29+
ChunkCodecCore = "0.4.2, 0.5"
30+
ChunkCodecLibZstd = "0.1.2, 0.2"
2931
CodecZlib = "0.6, 0.7"
3032
DataStructures = "0.17, 0.18"
3133
DateTimes64 = "1"
@@ -36,4 +38,4 @@ OffsetArrays = "0.11, 1.0"
3638
OpenSSL = "1"
3739
URIs = "1"
3840
ZipArchives = "2"
39-
julia = "1.2"
41+
julia = "1.10"

src/Compressors/zstd.jl

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
44
This file implements a Zstd compressor via ChunkCodecLibZstd.jl.
55
6-
=#
7-
8-
using ChunkCodecLibZstd: ZstdEncodeOptions, encode, decode, ChunkCodecCore
9-
6+
using ChunkCodecLibZstd: ZstdEncodeOptions
7+
using ChunkCodecCore: encode, decode, decode!
108
119
"""
1210
ZstdCompressor(;level=0, checksum=false)
@@ -33,10 +31,7 @@ function zuncompress(a, z::ZstdCompressor, T)
3331
end
3432
3533
function zuncompress!(data::DenseArray, compressed, z::ZstdCompressor)
36-
dst = reinterpret(UInt8, vec(data))
37-
n = length(dst)
38-
n_decoded = something(ChunkCodecCore.try_decode!(z.config.codec, dst, compressed))::Int64
39-
n_decoded == n || error("expected to decode $n bytes, only got $n_decoded bytes")
34+
decode!(z.config.codec, reinterpret(UInt8, vec(data)), compressed)
4035
data
4136
end
4237

0 commit comments

Comments
 (0)