brendan-duncan/archive

use decodeBytes error

LiangLuDev opened this issue · 0 comments

bytes length is 1876027

List bytes = File(filePath).readAsBytesSync();

// error
Archive archive = ZipDecoder().decodeBytes(bytes);

Unhandled Exception: FormatException: Unexpected extension byte (at offset 3)
#0 _Utf8Decoder.convertSingle (dart:convert-patch/convert_patch.dart:1783)
#1 Utf8Decoder.convert (dart:convert/utf.dart:321)
#2 InputStream.readString (package:archive/src/util/input_stream.dart:198)
#3 new ZipFileHeader (package:archive/src/zip/zip_file_header.dart:44)
#4 new ZipDirectory.read (package:archive/src/zip/zip_directory.dart:53)
#5 ZipDecoder.decodeBuffer (package:archive/src/zip_decoder.dart:20)
#6 ZipDecoder.decodeBytes (package:archive/src/zip_decoder.dart:14)