@Override
        public <T extends Message<T>> void mergeFrom(byte[] data, T message) throws IOException
        {
            try
            {
                final ByteArrayInput input = new ByteArrayInput(data, 0, data.length, true);
                message.cachedSchema().mergeFrom(input, message);
                input.checkLastTagWas(0);
            }
            catch (ArrayIndexOutOfBoundsException e)
            {
                throw ProtobufException.truncatedMessage(e);
            }
        }
Benchmark to compare the deserialization speed of 2 types. CodedInput and ByteArrayInput.

@author David Yu
@created Jun 22, 2010
protostuff-core/src/test/java/io/protostuff/CompareInputsTest.java