avoid unnecessary calculation of hash
@@ -170,7 +170,9 @@ public void write(int b) throws IOException {
@Override
public void write(byte[] data, int off, int len) throws IOException {
+ if (params.withContentChecksum) {
contentHash.update(data, off, len);
+ }
if (currentIndex + len > blockData.length) {
flushBlock();
while (len > blockData.length) {
