@Override
    public Checksum compute(final InputStream in, final TransferStatus status) throws BackgroundException {
        final InputStream normalized = this.normalize(in, status);
        final CRC32 crc32 = new CRC32();
        try {
            byte[] buffer = new byte[16384];
            int bytesRead;
            while((bytesRead = normalized.read(buffer, 0, buffer.length)) != -1) {
                crc32.update(buffer, 0, bytesRead);
            }
        }
        catch(IOException e) {
            throw new ChecksumException(e);
        }
        finally {
            IOUtils.closeQuietly(normalized);
        }
        return new Checksum(HashAlgorithm.crc32, Long.toHexString(crc32.getValue()));
    }
@Test
    public void testCompute() throws Exception {
        assertEquals("0",
                new CRC32ChecksumCompute().compute(new NullInputStream(0), new TransferStatus()).hash);
        assertEquals("d202ef8d",
                new CRC32ChecksumCompute().compute(new NullInputStream(1L), new TransferStatus()).hash);
    }