encode method
List<int> ?
encode(
- Archive archive, {
- int level = Deflate.BEST_SPEED,
- OutputStreamBase? output,
- DateTime? modified,
- bool autoClose = false,
inherited
Implementation
List<int>? encode(Archive archive,
{int level = Deflate.BEST_SPEED,
OutputStreamBase? output,
DateTime? modified,
bool autoClose = false}) {
output ??= OutputStream();
startEncode(output, level: level, modified: modified);
for (final file in archive.files) {
addFile(file, autoClose: autoClose);
}
endEncode(comment: archive.comment);
if (output is OutputStream) {
return output.getBytes();
}
return null;
}