All Projects → dbuenzli → nbcodec

dbuenzli / nbcodec

Licence: other
Non-blocking codec interface design for OCaml (pattern, experiment)

Programming Languages

ocaml
1615 projects
shell
77523 projects

Nbcodec — non-blocking IO interface design for OCaml

The rationale behind the design can be found in RATIONALE.md.

In src/se.ml there are two implementations of a streaming codec for simplified ASCII s-expressions.

  • Se.B implements a blocking codec.
  • Se.Nb implements a non-blocking codec.
  • Se.Enb implements a codec in direct style with an API that could be non-blocking assuming algebraic effects are part of the language.

The api documentation can be generated with

./build doc

the result is in _build/doc/api.docdir/Se.html.

The executable setrip.native can be used to test and benchmark the codecs, the source is test/setrip.ml it can be built with :

./build setrip.native

For example :

./setrip.native -enc -rseed 1067894368 > 1067894368.sexp

will generate a 32 Mo file of random s-expressions with the non-blocking codec. Use setrip.native -help for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].