compression - What are some good strategies for determining block size in a deflate algorithm? -


I'm writing a compression library as a little side project, and I'm still enough (my library is not compatible with any standard Presently, I cut the block after every 32k input (LZA 7 window size), gzip file, as well as analog output (but certainly not yet optimal) producing gzip output) It is a meaningful block closing strategy. Let me give it because this sensor and quick Was implemented in the form - now I am going back and actually trying to improve compression efficiency.

To simply say about this: "Compressor eliminates one block when it determines that starting a new block with the fresh tree will be useful, or when the block size of compressor is blocked by the block buffer "Which is not all helpful. / P>

I sorted through the SharpZipLib code (as I thought it would be the most readable open source implementation), and found that it ignores the input and eliminates every 16k literal output block . It is easy enough to implement, but it seems that there should be some more targeted approach, especially considering the language in specificity "it determines that starting a new block with fresh trees will be useful".

Does anyone have any ideas for new strategies, or examples of existing ones?

Thanks in advance!

A bizarre sound with sufficient size buffer for better compression signals Used to be.

This change is also a significant amount of load in compression bets due to the streaming behavior (complexity of important operations like flush requires more data before input) and flush.

In the general case, it would be possible to ensure that it produces optimum output on each point of the branches, where it is possible to start a new block, take recursing as required of both routes until all Routes are taken. The nest had won the nest behavior. It is very easy to start a non block size because it is very easy to start a new block.

It has been limited to at least 8K output liters, but it can prevent more than 32K liters in it, a block estimate is a relatively modest base for trying speculative algorithms. Call 8K at an all block.

The most simple (pseudo-code) will be:

  Make an empty sub block called a fixed, which is called an empty sub block, which makes a change in the spec, the empty sub Make block is called specKeep target = fixed while the incoming data is summarized in the target (s) if (fixed. Length% SUB_BLOCK_SIZ) == 0) {if the goal is fixed} {the target block is the same block Believing new blocks believe specKeep; And (if compression specchange - overhead better than SPEKKEPIPP) {Fixed a flush as a block. Fixed = specChange specKeep, specChange = empty // target specKeep, make specchange as before but meta data related to specChange Update to update} else {fixed = specKeep specKeep, specChange = empty // update again block meta data if (fixed MAX_BLOCK_SIZE) {flush fixed target is fixed}}}}} SPEAK change / speckkeep Use best The vacuity is not empty and fix a certain flush.  

Overhead for the cost of switching blocks is somewhat stable

It is thicker, and possibly improved. , But there is a beginning for analysis if nothing else uses the code for information about the device which causes the switch, which determines good mutations that a change can be beneficial ( Maybe that no

It can only be used for the creation of the imagination when the estimator thought it appropriate and if the estimation was found then you could overcome the speculative nature after becoming a strong indicator. And just decide to swap at that point.


Comments