Open GoogleCodeExporter opened 8 years ago
[This is what I wrote in a private email back to the reporter]
Second issue - bitstrings from streams. I guess I'm interested to
know what your approach will be. Clearly we don't want to make the
current bitstrings-as-strings impl slower by adding any indirection.
Also I have another, related requirement: bitstrings from arbitrary
sources. I'm very interested in parsing bitstrings where the
bitstring is loaded on-demand from some external resource, ie. from
virtual machine memory or disk image. This would involve calling some
arbitrary function when we need to load data. Something like this:
let f start size =
load_virtual_memory start size
in
let bits = Bitstring.bitstring_of_external f in
bitmatch bits with
| { ... } -> (* f is called on-demand to load new data as required *)
but not exactly like that because we usually also need to jump to
large offsets within the memory / disk image, and also to follow
pointers to other structures. I'm afraid I don't have a precise idea
about the best interface to this.
Original comment by richard....@gmail.com
on 20 Aug 2008 at 5:01
Discussion of this enhancement continues on the mailing list:
http://groups.google.com/group/bitstring
Original comment by richard....@gmail.com
on 22 Aug 2008 at 6:57
Original issue reported on code.google.com by
romain.b...@gmail.com
on 5 Aug 2008 at 11:00