package asn1-combinators
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=fa2984c6ea6e1e1c4fe2033f0165af611963c2400ce2ba051004b77dfc557c4e
sha512=710f6916e792d4134bf72cc1aa4696e1ba63cf472177439dfc17cee840f11c541287c00f923e9235c9c93825ca5570807ddd0b725738a657c4d5f2c230692c30
doc/asn1-combinators/Asn/index.html
Module AsnSource
Embed typed ASN.1 grammars in OCaml
Skip the notation part of Abstract Syntax Notation, and embed the abstract syntax directly in OCaml.
References
- ITU-T. Abstract Syntax Notation One (ASN.1): Specification of basic notation. ITU-T X.680 | ISO/IEC 8824-1, 2015
- ITU-T. ASN.1 encoding rules: Specification of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) and Distinguished Encoding Rules (DER). ITU-T X.690 | ISO/IEC 8825-1, 2015
v0.3.1 — homepage
Object identifiers
ASN.1 OBJECT IDENTIFIER.
ASN.1 Abstract Syntax
Abstract syntax of values of type 'a.
Encoding formats
Encoding and decoding
codec enc asn represents the syntax asn encoded under the rules enc.
This function performs work up-front, and is generally expected to be called in the static context on statically known syntaxes.
encode_into codec x is the pair (n, f), where n is the length of x encoded with codec, and f is a function that will write the encoded x to the first n bytes of the provided bytes.
Parse errors.
pp_error ppf err pretty-prints err on ppf.
decode codec cs is the pair (x, cs'), where x is the result of decoding the prefix of cs with codec and cs' are the trailing bytes, or an error.