Skip to content

Releases: macarie/compatto

v2.1.5

01 May 10:05

Choose a tag to compare

CommonJS exports are here!

Minor release that primarily adds support for CommonJS exports.

Other changes

See v2.1.4...v2.1.5 for all changes.

v2.1.4

06 May 19:38
70484d8

Choose a tag to compare

If it wasn't documented, it didn't happenโ€ฆ or did it? ๐Ÿค”

K, all jokes aside... That's still a minor release, that includes:

  1. a new paragraph about compression ratio;
  2. simplified a bit the paragraph about performance.

Other changes

See v2.1.3...v2.1.4 for all changes.

v2.1.3

02 May 09:16
9c67f1a

Choose a tag to compare

See v2.1.2...v2.1.3 for all changes.

v2.1.2

05 Apr 13:32
9a8c378

Choose a tag to compare

Keeping the code DRY ๐Ÿœ

Minor release that includes:

  • handling 254 and 255 chunks 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

28 Mar 15:40
5bde803

Choose a tag to compare

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

22 Mar 14:23

Choose a tag to compare

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

08 Mar 22:34

Choose a tag to compare

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 ๐Ÿ––๐Ÿผ

v1.0.0

11 Jan 22:47
edfc771

Choose a tag to compare

๐Ÿ“ฎ Compatto's initial release.

Highlights

  • ๐Ÿ’ฏ 100% Lines Coverage
  • ๐Ÿ“š User-definable dictionary
  • ๐ŸŒˆ Supports Unicode characters, like emojis
  • ๐ŸŽ Fast to compress small strings