package gapi-ocaml

  1. Overview
  2. Docs
A simple OCaml client for Google Services

Install

Dune Dependency

Authors

Maintainers

Sources

v0.4.6.tar.gz
sha256=b84b680528a5e050014103a8e7a60a5d43efd5fefc3f838310bd46769775ab48
md5=8ee26acf1f6c6f5e24c7b57fa070a0a2

doc/gapi-ocaml.netstring-local/Netencoding/QuotedPrintable/index.html

Module Netencoding.QuotedPrintableSource

This module implements the "Quoted Printable" encoding as * described in RFC 2045. * * This implementation assumes that the encoded string has a text MIME * type. On input both CR/LF and LF are accepted as end-of-line (eol) terminators, * but the output normalizes the eol delimiter as the crlf argument * specifies. Note that this implies that * - If crlf, the output uses CR/LF as line separator as MIME prescribes * - the encoding is not invertible for binary data

Sourceval encode : ?crlf:bool -> ?pos:int -> ?len:int -> string -> string

Encodes the string and returns it. * * Since OcamlNet 0.98, soft line breaks are added to the output * to ensure that all output lines have a length <= 76 bytes. * * Note unsafe characters: * As recommended by RFC 2045, the characters !#$\@[]^`|{}~ * and the double quotes * are additionally represented as hex tokens. * Furthermore, the letter 'F' is considered as unsafe if it * occurs at the beginning of the line, so the encoded text * never contains the word "From" at the beginning of a line. * * If pos and/or len are passed, only the substring starting at * pos (default: 0) with length len (default: rest of the string) * is encoded. * * If crlf is set (the default), the output text uses CR/LF as * line separator. Otherwise only LF is used.

Sourceval encode_tstring : ?crlf:bool -> ?pos:int -> ?len:int -> Netsys_types.tstring -> Bytes.t

Same for tagged string inputs. The result are always bytes, though

Sourceval encode_poly : ?crlf:bool -> ?pos:int -> ?len:int -> 's Netstring_tstring.tstring_ops -> 's -> Bytes.t

Polymorphic version

Sourceval decode : ?pos:int -> ?len:int -> string -> string

Decodes the string and returns it. * * Most format errors cause an Invalid_argument exception. * * If pos and/or len are passed, only the substring starting at * pos (default: 0) with length len (default: rest of the string) * is decoded.

Sourceval decode_tstring : ?pos:int -> ?len:int -> Netsys_types.tstring -> Bytes.t

Same for tagged string inputs. The result are always bytes, though

Sourceval decode_poly : ?pos:int -> ?len:int -> 's Netstring_tstring.tstring_ops -> 's -> Bytes.t

Polymorphic version

Sourceclass encoding_pipe : ?crlf:bool -> unit -> Netchannels.pipe

This pipe encodes the data written into the pipe.

This pipe decodes the data written into the pipe.

OCaml

Innovation. Community. Security.