TSON — Reduce your file size

Vedha Sankar
featurepreneur
Published in
Oct 3, 2021
Photo by Markus Winkler on Unsplash

So what is TSON exactly? TSON is a file type that we came up with to reduce the size of JSON files.

It is especially useful when we’re dealing with large JSON files as it compresses the files by mapping unique key values to a unique integer value to reduce the file size.

When dealing with large JSON files, we will find that the key values are usually repetitive and it causes the file sizes to increase a lot.

So, by mapping the unique values we were able to reduce the file size by 98%.

We were able to reduce a 32 MB file to a 834 KB file.

Here is the before and after of one of the files we converted.

Before
After

By using TSON, we can significantly reduce the file size.

Check out the open-source GitHub repository at https://github.com/tactlabs/tson

--

--