{:ok, content} = File.read("myfile")
<<header :: binary-size(12), remainder :: binary>> = content
{:ok, orig} = ExZstd.simple_decompress(remainder)
-> ** (MatchError) no match of right hand side value: {:error, 'Unable to determain decompressed size'}
There er no problems when running the zstd command from the terminal.
I’ve also trying the streaming solution, found in the test example.
But i fail to see how i get the tail, when the data is from a file, and not a compression stream.
Any who can help me out, or should i simply resort to calling the zstd command directly from my code.
That is a header that we manually put in, in the the (rust) program that actually produces the file. It only works in the terminal, if i remove the header we wrap it in.
Are you sure it is an actual zstd file? Have you tried writing out the file and skipping the header to a file and using the zstd program at that point?
It’s possible, it doesn’t look like that library links a built in zstd library but rather just whatever is available on the system. Maybe try a little hoist program to confirm that, like python with ffi for a quick link and test or so?