Skip to content
Discussion options

You must be logged in to vote

the version without trailing zero is always 40%-66% smaller

I think if you're seeing the upper range of that, then you probably have other differences. I don't think it's possible to get a 66% reduction by eliminating the trailing zeros for anything larger than a file with just a single integer between 0 and 9 and no trailing newline. Then you would get the 3 bytes with the trailing zero and 1 byte without it, for a 66.6% reduction. Anything beyond that, and all the extra brackets, commas, colons, quotes, and names are going to reduce that percentage.

The difference between {"duration":2,"time":1} and {"duration":2.0,"time":1.0} is 23 bytes vs 27 bytes. The reduced file is 14.8% smaller…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@gregmarr
Comment options

@YarNix
Comment options

@gregmarr
Comment options

@gregmarr
Comment options

Answer selected by YarNix
@YarNix
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants