clojure - Composing a Buffy buffer from the middle of an array and finding out how much it has consumed -
i'd use buffy interpret binary data starting middle of array. need find out how many bytes of array have been consumed buffy. let's have dynamic buffer definition this: (ns foo.core (:refer-clojure :exclude [read]) (:use [byte-streams]) (:require [clojurewerkz.buffy.core :refer :all] [clojurewerkz.buffy.frames :refer :all] [clojurewerkz.buffy.types.protocols :refer :all]) (:import [io.netty.buffer unpooled bytebuf])) (def dynbuf (let [string-encoder (frame-encoder [value] length (short-type) (count value) string (string-type (count value)) value) string-decoder (frame-decoder [buffer offset] length (short-type) string (string-type (read length buffer offset)))] (dynamic-buffer (frame-type string-encoder string-decoder second)))) i hoped use netty bytebuf parse bunch of b...