/** * Computes the CRC32C checksum of the supplied data, performs the "mask" operation * on the computed checksum, and then compares the resulting masked checksum to the * supplied checksum. * * @param expectedChecksum The checksum decoded from the stream to compare against * @param data The input data to calculate the CRC32C checksum of * @throws DecompressionException If the calculated and supplied checksums do not match */ static void validateChecksum(int expectedChecksum, ByteBuf data) { validateChecksum(expectedChecksum, data, data.readerIndex(), data.readableBytes()); }
/** * Computes the CRC32C checksum of the supplied data, performs the "mask" operation * on the computed checksum, and then compares the resulting masked checksum to the * supplied checksum. * * @param expectedChecksum The checksum decoded from the stream to compare against * @param data The input data to calculate the CRC32C checksum of * @throws DecompressionException If the calculated and supplied checksums do not match */ static void validateChecksum(int expectedChecksum, ByteBuf data) { validateChecksum(expectedChecksum, data, data.readerIndex(), data.readableBytes()); }
/** * Computes the CRC32C checksum of the supplied data, performs the "mask" operation * on the computed checksum, and then compares the resulting masked checksum to the * supplied checksum. * * @param expectedChecksum The checksum decoded from the stream to compare against * @param data The input data to calculate the CRC32C checksum of * @throws DecompressionException If the calculated and supplied checksums do not match */ static void validateChecksum(int expectedChecksum, ByteBuf data) { validateChecksum(expectedChecksum, data, data.readerIndex(), data.readableBytes()); }
if (validateChecksums) { int checksum = in.readIntLE(); validateChecksum(checksum, in, in.readerIndex(), chunkLength - 4); } else { in.skipBytes(4); in.writerIndex(oldWriterIndex); validateChecksum(checksum, uncompressed, 0, uncompressed.writerIndex()); } else { snappy.decode(in.readSlice(chunkLength - 4), uncompressed);
if (validateChecksums) { int checksum = in.readIntLE(); validateChecksum(checksum, in, in.readerIndex(), chunkLength - 4); } else { in.skipBytes(4); in.writerIndex(oldWriterIndex); validateChecksum(checksum, uncompressed, 0, uncompressed.writerIndex()); } else { snappy.decode(in.readSlice(chunkLength - 4), uncompressed);
if (validateChecksums) { int checksum = in.readIntLE(); validateChecksum(checksum, in, in.readerIndex(), chunkLength - 4); } else { in.skipBytes(4); in.writerIndex(oldWriterIndex); validateChecksum(checksum, uncompressed, 0, uncompressed.writerIndex()); } else { snappy.decode(in.readSlice(chunkLength - 4), uncompressed);
/** * Computes the CRC32C checksum of the supplied data, performs the "mask" operation * on the computed checksum, and then compares the resulting masked checksum to the * supplied checksum. * * @param expectedChecksum The checksum decoded from the stream to compare against * @param data The input data to calculate the CRC32C checksum of * @throws DecompressionException If the calculated and supplied checksums do not match */ static void validateChecksum(int expectedChecksum, ByteBuf data) { validateChecksum(expectedChecksum, data, data.readerIndex(), data.readableBytes()); }
/** * Computes the CRC32C checksum of the supplied data, performs the "mask" operation * on the computed checksum, and then compares the resulting masked checksum to the * supplied checksum. * * @param expectedChecksum The checksum decoded from the stream to compare against * @param data The input data to calculate the CRC32C checksum of * @throws DecompressionException If the calculated and supplied checksums do not match */ static void validateChecksum(int expectedChecksum, ByteBuf data) { validateChecksum(expectedChecksum, data, data.readerIndex(), data.readableBytes()); }
/** * Computes the CRC32C checksum of the supplied data, performs the "mask" operation * on the computed checksum, and then compares the resulting masked checksum to the * supplied checksum. * * @param expectedChecksum The checksum decoded from the stream to compare against * @param data The input data to calculate the CRC32C checksum of * @throws DecompressionException If the calculated and supplied checksums do not match */ static void validateChecksum(int expectedChecksum, ByteBuf data) { validateChecksum(expectedChecksum, data, data.readerIndex(), data.readableBytes()); }
/** * Computes the CRC32C checksum of the supplied data, performs the "mask" operation * on the computed checksum, and then compares the resulting masked checksum to the * supplied checksum. * * @param expectedChecksum The checksum decoded from the stream to compare against * @param data The input data to calculate the CRC32C checksum of * @throws DecompressionException If the calculated and supplied checksums do not match */ static void validateChecksum(int expectedChecksum, ByteBuf data) { validateChecksum(expectedChecksum, data, data.readerIndex(), data.readableBytes()); }
if (validateChecksums) { int checksum = in.readIntLE(); validateChecksum(checksum, in, in.readerIndex(), chunkLength - 4); } else { in.skipBytes(4); in.writerIndex(oldWriterIndex); validateChecksum(checksum, uncompressed, 0, uncompressed.writerIndex()); } else { snappy.decode(in.readSlice(chunkLength - 4), uncompressed);
if (validateChecksums) { int checksum = in.readIntLE(); validateChecksum(checksum, in, in.readerIndex(), chunkLength - 4); } else { in.skipBytes(4); in.writerIndex(oldWriterIndex); validateChecksum(checksum, uncompressed, 0, uncompressed.writerIndex()); } else { snappy.decode(in.readSlice(chunkLength - 4), uncompressed);
if (validateChecksums) { int checksum = in.readIntLE(); validateChecksum(checksum, in, in.readerIndex(), chunkLength - 4); } else { in.skipBytes(4); in.writerIndex(oldWriterIndex); validateChecksum(checksum, uncompressed, 0, uncompressed.writerIndex()); } else { snappy.decode(in.readSlice(chunkLength - 4), uncompressed);
if (validateChecksums) { int checksum = in.readIntLE(); validateChecksum(checksum, in, in.readerIndex(), chunkLength - 4); } else { in.skipBytes(4); in.writerIndex(oldWriterIndex); validateChecksum(checksum, uncompressed, 0, uncompressed.writerIndex()); } else { snappy.decode(in.readSlice(chunkLength - 4), uncompressed);