Future<void> unzip() async {
final ByteData zip = await rootBundle.load("assets/config.zip");
var bytes = zip.buffer.asUint8List(zip.offsetInBytes, zip.lengthInBytes);
var archive = ZipDecoder().decodeBytes(bytes, password: "password");
for (var file in archive) {
if (file.isFile) {
if (file.name.endsWith('.ini')) {
final content = utf8.decode(file.content);
final lines = LineSplitter.split(content);
for (final line in lines) {
Log.i(line);
}
}
}
}
}
flutter: 3.7.7
My zip is 540KB and I get OOM when decrypting
My code