   "Static spec type mark.")
 
 (defprotocol IReadableType
-  (read [_ buff] "Read self corresponding data from the specified buffer."))
+  (read [_ buff pos] "Read self corresponding data from the specified buffer."))
 
 (defprotocol IWritableType
-  (write [_ buff value] "Write value to the specified buffer."))
+  (write [_ buff pos value] "Write value to the specified buffer and return the written bytes."))
 
 (defprotocol ITypeSize
   (size [_] [_ data] "Read the size of the type. In static type data is optional."))

   (reify
     IStaticType
     IReadableType
     (read [_ buff]
       (buffer/read-long buff))

     IWritableType
     (write [_ buff value]
       (let [value (or value default)]
         (.putLong buff value)))

     ITypeSize
     (size [_]

   (reify
     IStaticType
     IReadableType
     (read [_ buff pos]
       [(buffer/read-int buff pos)
        (Integer/BYTES)])

     IWritableType
     (write [_ buff pos value]
       (let [value (or value default)]
         (buffer/write-int buff pos value)
         (Integer/BYTES)))

    ITypeSize
    (size [_]
