The most general case would be a codec that can have mixture of big
and little endian fields,
so legacy comms protocols or file formats can be supported.

For example:

(defcodec mixed (ordered-map :b :int16, :a :float32-le))
; total 6 bytes, first 2 bytes short in big endian format (JVM
default),
; followed by 4 byte float in little endian (Intel) format.

Zoka

On Nov 25, 3:00 am, Zach Tellman <ztell...@gmail.com> wrote:
> ByteBuffers have an order() method which allows you to toggle the
> endianness.  I haven't tested this, but since everything is built on
> top of Java's ByteBuffer functionality it should be fine as long as
> the ByteBuffers are correctly set and correctly ordered with respect
> to each other.
>
> Zach
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to