Optimize decoding with use of native buffers.