![]() |
|
|
|
|
1
21st October 17:33
External User
Posts: 1
|
Hi,
currently I have to process binary files. They contain 8, 16 and 32 bit values in little and big endian format as well as 8 bit characters and any mix of these. I am thinking about easy access to the individual values and don't want to re-invent the wheel. Thought about something roughly like (defrecord my-rec :size 512 first-value :long second-value :int-le third-value :char osition 200 forth-value (:char 10)) (with-record-slots (first-value forth-value) my-rec (any-function first-value) (another-function forth-value)) So I have several questions: 1. Does something like this already exist? 2. If not 1., should I think about making it stream based (perhaps using gray-streams) for my implementation? 3. If 2., is trivial-gray-streams http://common-lisp.net/project/cl-pl...streams.tar.gz enough (I use LispWorks)? Andreas |
|
|
|
|
4
21st October 17:33
External User
Posts: 1
|
"Andreas Thiele" <nospam@nospam.com> writes:
[...] Yes, see: Practical: Parsing Binary Files (chapter 24 of Peter Seibel's book "Practical Common Lisp"; source code available at the book site) http://www.gigamonkeys.com/book/prac...ary-files.html BINARY-TYPES www.cl-user.net/asp/libs/binary-types Paolo -- Why Lisp? http://wiki.alu.org/RtL%20Highlight%20Film The Common Lisp Directory: http://www.cl-user.net |
|
|
6
4th November 15:09
External User
Posts: 1
|
Frode Vatvedt Fjeld <frodef@cs.uit.no> writes:
[...] I have updated the entry. Paolo -- Why Lisp? http://wiki.alu.org/RtL%20Highlight%20Film The Common Lisp Directory: http://www.cl-user.net |
|