class SlicingCodec implements Codec<T> {

    public void encode(T value, BitChannel channel, Resolver resolver) throws IOException {
        wrapped.encode(value, new BoundedBitChannel(channel, sizeExpr.eval(resolver)), resolver);
    }

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

}