There are some differences with ocaml-h2 that still need to be addressed.
Error handling
Angstrom already has error handling, so I think there is no need to return a (header list, error) result if there is only one type of error.
Naming
Decoder.headers should be renamed to Decoder.decode_headers. I don't like the repetition in Decoder.decode_headers decoder very much, but it's probably clearer. Another possibility is to rename Encoder.encode_header to Encoder.header.
I prefer Encoder.change_table_size and Decoder.change_table_size_limit over set_capacity for both.
I think never_index is more descriptive than sensitive. It's perfectly possible to encode headers that are not sensitive with never_index. But it's not a strong preference, I'm okay with sensitive too.
Interface changes
The (optional) arguments of Decoder.create and Encoder.create are changed, but it's easy to adapt h2.
In #8 there is a bigger change to the interface, that makes Header.t a private type.
Header list order
The header list is not reversed anymore.
Table size changes
These are not implemented yet in h2.
There are some differences with ocaml-h2 that still need to be addressed.
Error handling
Angstrom already has error handling, so I think there is no need to return a
(header list, error) resultif there is only one type of error.Naming
Decoder.headersshould be renamed toDecoder.decode_headers. I don't like the repetition inDecoder.decode_headers decodervery much, but it's probably clearer. Another possibility is to renameEncoder.encode_headertoEncoder.header.I prefer
Encoder.change_table_sizeandDecoder.change_table_size_limitoverset_capacityfor both.I think
never_indexis more descriptive thansensitive. It's perfectly possible to encode headers that are not sensitive with never_index. But it's not a strong preference, I'm okay withsensitivetoo.Interface changes
The (optional) arguments of
Decoder.createandEncoder.createare changed, but it's easy to adapt h2.In #8 there is a bigger change to the interface, that makes
Header.ta private type.Header list order
The header list is not reversed anymore.
Table size changes
These are not implemented yet in h2.