Juggling with binary files?



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 :position 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-plus-ssl/download/trivial-gray-streams.tar.gz enough (I use
LispWorks)?

Andreas


.



Relevant Pages

  • Re: Juggling with binary files?
    ... endian format as well as 8 bit characters and any mix of these. ... I am thinking about easy access to ... should be a good starting point without wheel reinvention. ...
    (comp.lang.lisp)
  • Re: Opinion) Overuse of symbolic constants
    ... >> typically done by newbies at play. ... >does not allow easy access to those characters, and I am sure you have not ... Dan Pop ...
    (comp.lang.c)
  • Re: Opinion) Overuse of symbolic constants
    ... >> typically done by newbies at play. ... >does not allow easy access to those characters, and I am sure you have not ... Dan Pop ...
    (comp.lang.cpp)
  • Re: Opinion) Overuse of symbolic constants
    ... >> those characters, or if it was unconviniently difficult to type them. ... > typically done by newbies at play. ... does not allow easy access to those characters, and I am sure you have not ...
    (comp.lang.cpp)
  • Re: Opinion) Overuse of symbolic constants
    ... >> those characters, or if it was unconviniently difficult to type them. ... > typically done by newbies at play. ... does not allow easy access to those characters, and I am sure you have not ...
    (comp.lang.c)