CompressionUtils: Increase gzip buffer size. (#12579)

This commit is contained in:
Gian Merlino 2022-05-31 11:38:13 -07:00 committed by GitHub
parent 6d2ff796a3
commit b639298f6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -72,6 +72,7 @@ public class CompressionUtils
private static final String ZIP_SUFFIX = ".zip"; private static final String ZIP_SUFFIX = ".zip";
private static final String SNAPPY_SUFFIX = ".sz"; private static final String SNAPPY_SUFFIX = ".sz";
private static final String ZSTD_SUFFIX = ".zst"; private static final String ZSTD_SUFFIX = ".zst";
private static final int GZIP_BUFFER_SIZE = 8192; // Default is 512
/** /**
* Zip the contents of directory into the file indicated by outputZipFile. Sub directories are skipped * Zip the contents of directory into the file indicated by outputZipFile. Sub directories are skipped
@ -370,7 +371,8 @@ public class CompressionUtils
// so we estimate about 1KiB to work around available == 0 bug in GZIPInputStream // so we estimate about 1KiB to work around available == 0 bug in GZIPInputStream
return otherAvailable == 0 ? 1 << 10 : otherAvailable; return otherAvailable == 0 ? 1 << 10 : otherAvailable;
} }
} },
GZIP_BUFFER_SIZE
); );
} }