I am verifying a Hardware Design block which does decompression (inflate). The decompressed data output should always be 4 KiB. As test data I am compressing chunks of 4 KiB data at a time using zlib's deflate, and providing that as input to my test. I ran multiple regressions and I am never observing a case where the code length is 15. Do you have any suggestions on how to get that, or why it is not possible?
Code length of 15 not being hit in Zlib for 4KB Raw Data
134 views Asked by Bhanu At
1
There are 1 answers
Related Questions in ZLIB
- How can I eliminate compile warnings using ZLib in Visual Studio
- problem with decompressing encrypted data in frontend
- C++ how to unzip file
- How can I decompress gzipped http bodies in a nodejs application?
- Unable to build rsyslog with static libz.a (zlib) file
- Missing System.IO.Compression.Native.dll in .NET 8 leads to error when using GZipStream
- Zlib compression in Powershell
- What is going on with the last two lext[] values in zlib?
- Linker can't find zlib or OpenSSL?
- How can i deobfuscate base64 zlib when i have obfuscate method?
- How to fix puppeteer intermittently failing when downloading chrome-headless-shell on CI
- How do I unpack/unzip a "(.TRS/PACK) TERSE compressed data (PACK, V) (2000/1)" file?
- Unresolved external symbol for statically build zlib
- Can't extract squashfs file system using unsquashfs tools
- how to decompress and write to disk lz4 compressed OS image
Related Questions in DEFLATE
- Compress gzip/Deflate string with golang
- Why do i get more 256 false positive in PKZIP Decryption key verification?
- How to decompress the contents of a var to another var?
- What is the actual structure of a dynamic huffman block?
- Is the DEFLATE compression algorithm in ZIP and GZip formats based on LZ77 or LZSS?
- How can one correctly extract Huffman Tree from a dynamic compressed block?
- Is it possible match initial bytes of Deflate compressed data using knowledge of first portion of uncompressed data?
- How does a decompressor know the huffman tree that was used by the compressor?
- What is the difference between 7-zip Deflate and zlib.compress()?
- Does `deflate` always compress your entire block?
- How to decompress IDAT compressed data
- Compression Discrepancy in BMEcat XML Files Generated via Talend vs. eprocat
- .net DeflateStream fails to decode a PDF stream object content
- Iterate through all possible code length distributions for canonical Huffman
- (Deflate) Is using a code of 284 for a distance pair with a length of 258 allowed in a Huffman compressed Deflate block?
Related Questions in INFLATE
- zlib: uncompressing large file leads to "invalid code lengths set " error
- express.raw() doesn't inflate a zlib-compressed object
- Java Deflater for large set of random strings
- After reboot, on resumption of uncompression, inflate() is reporting Z_DATA_ERROR
- How to get size of uncompressed gzip file using flate2
- Issues decompressing (FlateDecode) audio data in XFDF from Adobe Acrobat
- How does zlib inflate GZIP trailer correctly in JAVA?
- Code length of 15 not being hit in Zlib for 4KB Raw Data
- DeflateReset or clear API for allocated InflateRaw (fast-zlib) object
- zlib/miniz: how to configure inflate for very low memory usage?
- Java inflate exception on raw data
- Java.util.zip.DataFormatException: incorrect header check
- git clone error [ error: inflate: data stream error (incorrect data check) ]
- Why does the PNG specification prohibit having zlib-compressed data with a preset dictionary?
- Is it always okay to Inflate zlib-wrapped data with the windowBits of 15?
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Here you go:
That is a Base64 encoding of a zlib stream that decompresses to 4096 bytes, and that has 15-bit symbols. It was constructed by generating the Lucas numbers, 2, 1, 3, 4, 7, 11, ..., 521, 843. The initial 2 is decremented to 1, to account for the end-of-block symbol in deflate. Then 15 symbols are emitted with those frequencies. (I chose the lower-case letters
a..o, withaappearing 843 times.) That results in a sequence of 2205 bytes, which, with the end-of-block symbol, is the smallest possible input that can result in a 15-bit code. That is less than your 4096, so it is indeed possible to generate the test vector you are looking for.I then appended another 1891
a's, to fill it out to 4096 bytes. That does not change the resulting Huffman code. You then take that sequence and compress with zlib using the Huffman-only strategy (Z_HUFFMAN_ONLYin zlib, orpigz -zH), in order to avoid LZ77 compression of the long, repeated strings of symbols.If you just want a raw deflate stream, then remove the first two and last four bytes of the zlib stream.