Hello Mehmet,

To narrow this down, I would try it from whatever command line tool Zstd
might have. If that doesn't work, then it's likely the file is corrupted.

If the Zstd CLI works, then I would try just using the Zstd library; if
that doesn't work for you, then that's where the problem should be.

If it works, then it should be an issue in Commons Compress. At that point,
you would create a Jira ticket and attach the problem file.

HTH,
Gary


On Tue, Jan 21, 2025, 15:52 Karaman, Mehmet
<mehmet.kara...@advantest.com.invalid> wrote:

> Hello,
>
> I am trying to uncompress zstd compressed files with the commons-compress
> library and I get the ZstdIOException "truncated source":
>
> com.github.luben.zstd.ZstdIOException: Truncated source
> at
> com.github.luben.zstd.ZstdInputStreamNoFinalizer.readInternal(ZstdInputStreamNoFinalizer.java:174)
> at
> com.github.luben.zstd.ZstdInputStreamNoFinalizer.read(ZstdInputStreamNoFinalizer.java:136)
> at com.github.luben.zstd.ZstdInputStream.read(ZstdInputStream.java:103)
> at
> org.apache.commons.compress.compressors.zstandard.ZstdCompressorInputStream.read(ZstdCompressorInputStream.java:104)
> at
> org.apache.commons.compress.compressors.zstandard.ZstdCompressorInputStream.read(ZstdCompressorInputStream.java:96)
>
> Does it mean that the Stream ended before the expected compression ended?
> The Data from the uncompressed stream is what I am expecting, so I just
> need to get rid of that exception. Is there a way how to verify this?
>
> Thank you in advance.
>
> Best Regards,
> Mehmet
>

Reply via email to