Description
Dart SDK version: 2.12.0 (stable) (Thu Feb 25 19:50:53 2021 +0100) on "windows_x64"
used to reproduce and test, but also an issue on Flutter (Android ARM64).
When decoding gzip data compressed with a custom dictionary using another language (go)'s implementation, Dart returns Filter error, bad data
. However, the same content compressed using the custom dictionary in Dart works fine. That lead me to believe that it's a bug in my go code, however I then wrote an implementation in python, which is able to decode both the go and dart versions. This leads me to believe there is a bug in Dart's implementation. Strangely Dart sets the gzip flag for the OS to TOPS-20 (10) as well (although this is not a bug just strange behavior that maybe has to do with the issue).
I have managed to consistently reproduce this issue on Windows, and have attached a ZIP with some example files for testing/debugging. The files are as follows:
[pgd]
: contains the python gzip module modified to support reading gzip files with custom dictionaries (just adds to the zlib call)gdict.bin
: the custom dictionary usedtest.dart
: the dart script used to createtestpart.html.dart.gz
and which also fails to decompresstestpart.html.go.gz
test.py
: the python script which can successfully decompress both .gz filestestpart.html
: the test plaintexttestpart.html.dart.gz
: the dictionary-compressed file created bytest.dart
testpart.html.go.gz
: the dictionary-compressed file created by the go backend
Please let me know if there's anything else I can provide anything else that may help, I'm eager to get this resolved.