0

I need to make a Deflate code in Matlab. I understood how to make a file, comressed by matlab with matlab.io.hdf4.sd.getcompinfo and H5P.set_deflate(plist_id,level), but I guess that its not what exactly I want.

I need to compress bitstream of the image by Deflate and by my algorithm and compare output bitstreams. Maybe I just don't understand how to do it by standart functions? I need assistance anyway.

1
  • Any reason you can't just link to the zlib callable function? Seems a whole lot easier than writing your own deflate compressor. See mathworks.com/help/matlab/ref/… for info on linking to external code. Commented May 20, 2016 at 13:16

1 Answer 1

2

Just use the gzip already built in to MATLAB. If you really want just the deflate payload in the gzip file, then you can strip the gzip header and trailer.

Your need to "compare output bitstreams" is odd. What are you looking for? Note that there can be many deflate compressions of the same input data that are all valid.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.