/** * Gets the CRC of the completed block. Only valid after calling {@link #close(ByteBuf)}. * @return The block's CRC */ int crc() { return crc.getCRC(); } }
/** * Update the CRC with a sequence of identical bytes. * @param value The value to update the CRC with * @param count The number of bytes */ public void updateCRC(final int value, int count) { while (count-- > 0) { updateCRC(value); } } }
/** * Gets the CRC of the completed block. Only valid after calling {@link #close(ByteBuf)}. * @return The block's CRC */ int crc() { return crc.getCRC(); } }
/** * Update the CRC with a sequence of identical bytes. * @param value The value to update the CRC with * @param count The number of bytes */ public void updateCRC(final int value, int count) { while (count-- > 0) { updateCRC(value); } } }
/** * Gets the CRC of the completed block. Only valid after calling {@link #close(ByteBuf)}. * @return The block's CRC */ int crc() { return crc.getCRC(); } }
/** * Update the CRC with a sequence of identical bytes. * @param value The value to update the CRC with * @param count The number of bytes */ public void updateCRC(final int value, int count) { while (count-- > 0) { updateCRC(value); } } }
/** * Verify and return the block CRC. This method may only be called * after all of the block's bytes have been read. * @return The block CRC */ int checkCRC() { final int computedBlockCRC = crc.getCRC(); if (blockCRC != computedBlockCRC) { throw new DecompressionException("block CRC error"); } return computedBlockCRC; } }
crc.updateCRC(value, runLength);
/** * Verify and return the block CRC. This method may only be called * after all of the block's bytes have been read. * @return The block CRC */ int checkCRC() { final int computedBlockCRC = crc.getCRC(); if (blockCRC != computedBlockCRC) { throw new DecompressionException("block CRC error"); } return computedBlockCRC; } }
crc.updateCRC(value, runLength);
/** * Verify and return the block CRC. This method may only be called * after all of the block's bytes have been read. * @return The block CRC */ int checkCRC() { final int computedBlockCRC = crc.getCRC(); if (blockCRC != computedBlockCRC) { throw new DecompressionException("block CRC error"); } return computedBlockCRC; } }
crc.updateCRC(value, runLength);
writer.writeInt(out, crc.getCRC()); writer.writeBoolean(out, false); // Randomised block flag. We never create randomised blocks writer.writeBits(out, 24, bwtStartPointer);
writer.writeInt(out, crc.getCRC()); writer.writeBoolean(out, false); // Randomised block flag. We never create randomised blocks writer.writeBits(out, 24, bwtStartPointer);
writer.writeInt(out, crc.getCRC()); writer.writeBoolean(out, false); // Randomised block flag. We never create randomised blocks writer.writeBits(out, 24, bwtStartPointer);
/** * Gets the CRC of the completed block. Only valid after calling {@link #close(ByteBuf)}. * @return The block's CRC */ int crc() { return crc.getCRC(); } }
/** * Update the CRC with a sequence of identical bytes. * @param value The value to update the CRC with * @param count The number of bytes */ public void updateCRC(final int value, int count) { while (count-- > 0) { updateCRC(value); } } }