Here is the compression code: https://gist.github.com/kissgyorgy/39623a7d0ba2f6faafb464b72...
I used the properties of my data structure (multiple cards represented in a byte as bits) to represent the same data on less bytes (to avoid compressing JSON with unnecessary characters)