toZipBytes method

List<int>? toZipBytes({
  1. required String? password,
  2. int level = Deflate.DEFAULT_COMPRESSION,
  3. OutputStreamBase? output,
  4. DateTime? modified,
  5. bool autoClose = true,
})

archive to zip bytes

Implementation

List<int>? toZipBytes({
  required String? password,
  int level = Deflate.DEFAULT_COMPRESSION,
  OutputStreamBase? output,
  DateTime? modified,
  bool autoClose = true,
}) {
  final ZipEncoder zipEncoder = ZipEncoder(
    password: password,
  );

  return zipEncoder.encode(
    archive,
    level: level,
    modified: modified ?? DateTime.now(),
    autoClose: autoClose,
  );
}