4546474849505152535455
int n = 0; BufferUnpacker u = new MessagePack().createBufferUnpacker(); UnpackerIterator it = u.iterator(); for(int i=0; i < raw.length; i++) { u.feed(raw, i, 1); while(it.hasNext()) { Value v = it.next(); assertEquals(vs.get(n), v); n++; }
7273747576777879808182
int n = 0; BufferUnpacker u = new MessagePack().createBufferUnpacker(); UnpackerIterator it = u.iterator(); for(int i=0; i < raw.length; i+=11) { u.feed(raw, i, 11); while(it.hasNext()) { Value v = it.next(); assertEquals(vs.get(n), v); n++; }
949596979899100101102103104
BufferPacker pk = new MessagePack().createBufferPacker(); pk.write(v); byte[] raw = pk.toByteArray(); //pk.reset(); u.feed(raw, 0, raw.length); assertTrue(it.hasNext()); Value ov = it.next(); assertEquals(v, ov); //assertFalse(it.hasNext());