Releases: macarie/compatto
v2.1.5
v2.1.4
If it wasn't documented, it didn't happenโฆ or did it? ๐ค
K, all jokes aside... That's still a minor release, that includes:
- a new paragraph about compression ratio;
- simplified a bit the paragraph about performance.
Other changes
See v2.1.3...v2.1.4 for all changes.
v2.1.3
See v2.1.2...v2.1.3 for all changes.
v2.1.2
Keeping the code DRY ๐
Minor release that includes:
- handling
254and255chunks while decoding with helper functions, so that the code is drier (hah!); - a fix for an incorrect index used inside an error message (d5e1fa2);
- updates to the development tools.
Other changes
Spoiler: there are none, again.
See v2.1.1...v2.1.2 for all changes.
v2.1.1
Development tools need updates as well ๐
Minor release that includes:
- updates to the development tools;
- code formatted with the new rules, so tests don't fail;
- in error messages,
โis now preferred over'.
Other changes
Spoiler: there are none.
See v2.1.0...v2.1.1 for all changes.
v2.1.0
Out of clutter, find simplicity
So, v2.1 is here, yay! ๐๐ผ
Cool, but what changed since v2.0?
Not much, the changes have more to do with the inside than the outside of compatto.
The algorithm used by compress() is now simpler and easier for both humans and computers to understand and follow.
Would you expect much out of this? If you didn't, you'll be surprised: it has improved speed by about 20% if we consider v2.0 as the main reference! Comparing against v1.0, v2.1 is 40% faster ๐
Other changes
See v2.0.0...v2.1.0 for all changes.
v2.0.0
I'm happy to introduce compatto v2 ๐ง
While developing v2 all the focus was on improving performance and reducing the bundle size, but this also led to a breaking API change, hence the major version release ๐
If the focus was on performance, what did change?
Well, now compress() internally converts the dictionary in a trie, or something close to it. This is a lot faster than the old method used!
How much faster? Approximately 30% faster!
Do you want to know more about performance? Check out the Performance section of the readme ๐ฆฆ
Reducing bundle size you say?
Yes, now the dictionary has to be explicitly set by users, like that:
import { dictionary } from 'compatto/dictionary'
import { compatto } from 'compatto'
const { compress, decompress } = compatto({ dictionary })This helps to reduce the bundle size for people that don't use the default dictionary.
Also moving away from the class implementation helped, now the code can be minified better, like almost 2 times better ๐
I think that that is a breaking change, are there others?
As you've seen in the example code above, now the compatto import is a function and not an object anymore. To use compress() and decompress() you have to call it, you can then use these functions through the returned object of compatto().
A quick way to update without having to mess up the existing code is:
import { dictionary } from 'compatto/dictionary'
import { compatto as c } from 'compatto'
const compatto = c({ dictionary })Another breaking change is the removal of create(), now compatto() itself is create().
You can explore v2's API in its section of the readme ๐ฆฆ
Other changes
- The readme has been updated, I hope it is clearer now ๐
- Typings and in-code docs updated as well ๐ง
- More tests that should help prevent implementation errors ๐๐ผ
See v1.0.0...v2.0.0 for all changes.
That's all for now, see ya ๐๐ผ