class SlicingCodec implements Codec<T> {

    public T decode(BitBuffer buffer, Resolver resolver, Builder builder)
            throws DecodingException {
        BitBuffer slice = buffer
                .slice(sizeExpr.eval(resolver));
        return wrapped.decode(slice, resolver, builder);
    }

    public  SlicingCodec(Codec<T> wrapped, Expression<Integer, Resolver> sizeExpr);

}