I'm having a gzipped file that seems to be missing characters when I uncompress the data in PHP. However when I do this for e.g. in Python the characters are present. In this case the last 2 characters (']}') are missing, which makes the data an invalid JSON.
Below 2 examples that both output different results; how is it possible that PHP doesn't output the full data? I've also inspected the GZIP content and it looks like the length and CRC are not valid; at least when I compare the structure with the data from this site: https://docs.fileformat.com/compression/gz/
<?php
$base64gzip = 'H4sIAAAAAAAAA7XSO04DQAwE0J5jbE3h8d9cJUoRiSPQcXmEFKR4KFKlfdr12Lv+Pp+3r9v5uFwORnTSACTO9f3tUcKfiLbOsFQsEVMxEkwtMRNROtO9b4V0yT5TAcoq5O5QBtkssSeV6LxnSUXWVEKDp5jmDocmNa3e6ZapYJE9OypCWXxXDo0BC2VJKr+qT3AdTXsialw5BHb/5ZBwbRNHWm2C51/aA3n/IwNX9+RJaveE369mcdrOmNFXScdLxKUg64GgkkqLFrz4JjJ+rj/Cx4XMxgMAAB+LCAAAAAAAAAOLrQUAZzx4YAIAAAA=';
echo gzdecode(base64_decode($base64gzip));
#!/usr/bin/python
import gzip
import base64
base64gzip = '''H4sIAAAAAAAAA7XSO04DQAwE0J5jbE3h8d9cJUoRiSPQcXmEFKR4KFKlfdr12Lv+Pp+3r9v5uFwORnTSACTO9f3tUcKfiLbOsFQsEVMxEkwtMRNROtO9b4V0yT5TAcoq5O5QBtkssSeV6LxnSUXWVEKDp5jmDocmNa3e6ZapYJE9OypCWXxXDo0BC2VJKr+qT3AdTXsialw5BHb/5ZBwbRNHWm2C51/aA3n/IwNX9+RJaveE369mcdrOmNFXScdLxKUg64GgkkqLFrz4JjJ+rj/Cx4XMxgMAAB+LCAAAAAAAAAOLrQUAZzx4YAIAAAA='''
print(gzip.decompress(base64.b64decode(base64gzip)))
^^ Python outputs this data, including the last ']}' characters.
b'{"data":[["190296311161"],\n["190296311154"],\n["190296311154"],\n["190296328299"],\n["190296328275"],\n["190296303203"],\n["190296303197"],\n["190296333002"],\n["190296303883"],\n["190296350870"],\n["190296307515"],\n["190296307164"],\n["190296309168"],\n["190296309151"],\n["190296305863"],\n["075679761255"],\n["190296303982"],\n["190296303975"],\n["190296332784"],\n["190296336621"],\n["190296336607"],\n["190296317552"],\n["190296317545"],\n["190296352591"],\n["190296352584"],\n["190296306297"],\n["190296334955"],\n["190296352263"],\n["190296352263"],\n["190296323584"],\n["190296350139"],\n["5054283041637"],\n["5054283014655"],\n["5054283014648"],\n["5054283014631"],\n["190296350146"],\n["190296306273"],\n["190296310751"],\n["190296310744"],\n["190296315992"],\n["190296315992"],\n["190296315992"],\n["190296315992"],\n["190296315992"],\n["190296315985"],\n["190296315985"],\n["190296315985"],\n["190296315985"],\n["190296315985"],\n["190296340710"],\n["5054283120622"],\n["190296305870"],\n["190296330094"]]}'
Can some one point me in the right direction why this fails in PHP and how I can still make sure I get the same content as for e.g. in Python?