class CountingBytesSource extends AbstractChainedSource<byte[], byte[], byte[], byte[]> implements HashedKeySource<byte[], byte[]> {

    @Override
    public void delete(byte[] key) {
        synchronized (this) {
            int srcCount;
            byte[] srcVal = null;
            if (filter == null || filter.maybeContains(key)) {
                srcVal = getSource().get(key);
                srcCount = decodeCount(srcVal);
            } else {
                srcCount = 1;
            }
            if (srcCount > 1) {
                getSource().put(key, encodeCount(decodeValue(srcVal), srcCount - 1));
            } else {
                getSource().delete(key);
            }
        }
    }

    public  CountingBytesSource(Source<byte[], byte[]> src);
    public  CountingBytesSource(Source<byte[], byte[]> src, boolean bloom);

}