only write content hash when requested
@@ -245,8 +245,10 @@ private void flushBlock() throws IOException {
private void writeTrailer() throws IOException {
out.write(END_MARK);
+ if (params.withContentChecksum) {
ByteUtils.toLittleEndian(out, contentHash.getValue(), 4);
}
+ }
}
