Comments (2)
A quick bechmark shows that the following moification of step_search() seems to improve compression ratio:
match = find_match(here);
if (match.found && find_match(here + 1).len <= match.len) {
emit_backref();
else
emit_literal();
(here + 1
seems to work better than here + break_even_point / 9
for some reason.)
Time to code it without calling find_match() twice as much. It's also completely meaningless when backref encoding is not longer than literal encoding.
from heatshrink.
I haven't had much time to play with it lately, but here's an implementation of the above:
https://github.com/atomicobject/heatshrink/compare/master...unixdj:look-forward?expand=1
It's still really slow. Really really slow. But compression ratio is higher.
from heatshrink.
Related Issues (20)
- heatshrink with -w 15 and HEATSHRINK_USE_INDEX=1 loops infinitely for >= 32768 byte file HOT 5
- Compression parameters not stored in compressed data?? HOT 4
- Failure when compressing no data HOT 2
- Usage is not shown if no arg given HOT 1
- Compilation fails on Centos 7 / Python3.6 (c compiler std definition) HOT 1
- Compatibility on PIC32 HOT 1
- Fallthrough in usage should be `break`
- heatshrink_encoder_sink doesn't behave as documented
- Decoder for JavaScript? HOT 3
- [Question] Outpud compat of static vs dynamic version HOT 2
- Usage simplified if heatshrink_encoder_poll() returns HSER_POLL_MORE when finish flag is set and output buffer is full HOT 1
- heatshrink_decoder_poll return HSDR_POLL_MORE if out buffer is exactly sized as the decoded result HOT 4
- [Question] What should `heatshrink_encoder_poll` and `heatshrink_encoder_finish` return if nothing has been sunk? HOT 1
- Question on how to use encoder in this specific example
- My 8086 DOS heatshrink uses (segmented inicomp depacker, single-segment help page depacker, streaming ELD library depacker)
- anyone know of an encoder for js? HOT 2
- compress stream of array involve negative values HOT 2
- Restart decompression HOT 2
- Indexing for a 15-bit window encoder does not work
- Encoding with options -w 10 -l 5 and then decoding leads to corrupted file HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from heatshrink.