{
checkNotNull(block, "block is null");
checkState(!finished, "already finished");
if (encoding == null) {
encoding = new SnappyBlockEncoding(block.getType(), block.getEncoding());
blockBuilder = block.getType().createBlockBuilder(new BlockBuilderStatus());
}
for (int position = 0; position < block.getPositionCount(); position++) {
block.appendTo(position, blockBuilder);
if (blockBuilder.isFull()) {