private byte[] expandBlock(final byte[] block, final int valuebits) {
        bitplaneCount[valuebits]++;
        final byte[] newblock = new byte[sizeForBits(valuebits + 1)];
        final int headersize = 1 << valuebits;
        System.arraycopy(block, 0, newblock, 0, headersize); // copy header
        System.arraycopy(block, headersize, newblock, 2 * headersize, block.length - headersize); // copy data
        return newblock;
    }
Creates a DenseLongMap for the given block size

@param blocksize bytes per bit-plane
main/src/main/java/cgeo/geocaching/brouter/util/DenseLongMap.java