diff --git a/src/write.rs b/src/write.rs index 35374aa6..d0f5165a 100644 --- a/src/write.rs +++ b/src/write.rs @@ -471,6 +471,7 @@ impl ZipWriter { file.uncompressed_size = self.stats.bytes_written; let file_end = writer.stream_position()?; + debug_assert!(file_end >= self.stats.start); file.compressed_size = file_end - self.stats.start; update_local_file_header(writer, file)?;