Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ocaml-bitstring doesn't support stream #1

Open
GoogleCodeExporter opened this issue Jul 31, 2015 · 2 comments
Open

Ocaml-bitstring doesn't support stream #1

GoogleCodeExporter opened this issue Jul 31, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

   Hi !

For our project (liquidsoap), we have tested ocaml-bitstring, and we find 
it really really good !

However, in order to use it in our project, we would like to be able to 
treat streamed data, which doesn't seem possible at the moment.

Could ocaml-bitstring be extended to support streamed data ? 

Original issue reported on code.google.com by [email protected] on 5 Aug 2008 at 11:00

@GoogleCodeExporter
Copy link
Author

[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 [email protected] on 20 Aug 2008 at 5:01

  • Changed state: Accepted
  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

@GoogleCodeExporter
Copy link
Author

Discussion of this enhancement continues on the mailing list:
http://groups.google.com/group/bitstring

Original comment by [email protected] on 22 Aug 2008 at 6:57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant