package gapi-ocaml
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=3a9e7ba4446b90f842c10dc2e49211c394c9f012715da01bb0b80baccabb41bb
md5=27919a0188772392e9b74bfd95fbaaa1
doc/gapi-ocaml.netstring-local/Netencoding/Base64/index.html
Module Netencoding.Base64Source
Base64 encoding as described in RFC 2045
val encode :
?pos:int ->
?len:int ->
?linelength:int ->
?crlf:bool ->
?plus:char ->
?slash:char ->
string ->
stringCompute the "base 64" encoding of the given string argument. * Note that the result is a string that only contains the characters * a-z, A-Z, 0-9, +, /, =, and optionally spaces, CR and LF characters. * * 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. * * The result is divided up into lines not longer than linelength * (without counting the line separator); default: do not divide lines. * If linelength is smaller than 4, no line division is performed. * If linelength is not divisible by 4, the produced lines are a * bit shorter than linelength. * * If crlf (default: false) the lines are ended by CRLF; otherwise * they are only ended by LF. * (You need the crlf option to produce correct MIME messages.) * * By default, the 63rd character of the alphabet is '+', and the * 64th character is '/'. By passing plus and slash you can * choose different characters. *
val encode_tstring :
?pos:int ->
?len:int ->
?linelength:int ->
?crlf:bool ->
?plus:char ->
?slash:char ->
Netsys_types.tstring ->
Bytes.tSame for tagged string inputs. The result are always bytes, though
val encode_poly :
?pos:int ->
?len:int ->
?linelength:int ->
?crlf:bool ->
?plus:char ->
?slash:char ->
's Netstring_tstring.tstring_ops ->
's ->
Bytes.tPolymorphic version
val decode :
?pos:int ->
?len:int ->
?accept_spaces:bool ->
?plus:char ->
?slash:char ->
string ->
stringDecodes the given string argument. * * 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. * * If accept_spaces (default: false) is set, the function ignores * white space contained in the string to decode (otherwise the * function fails if it finds white space). Furthermore, the character * '>' is considered as "space", too (so you don't have trouble with * mbox mailboxes that accidentally quote "From"). * * By default, the 63rd character of the alphabet is '+', and the * 64th character is '/'. By passing plus and slash you can * choose different characters.
val decode_tstring :
?pos:int ->
?len:int ->
?accept_spaces:bool ->
?plus:char ->
?slash:char ->
Netsys_types.tstring ->
Bytes.tSame for tagged string inputs. The result are always bytes, though
val decode_poly :
?pos:int ->
?len:int ->
?accept_spaces:bool ->
?plus:char ->
?slash:char ->
's Netstring_tstring.tstring_ops ->
's ->
Bytes.tPolymorphic version
class encoding_pipe : ?linelength:int -> ?crlf:bool -> ?plus:char -> ?slash:char -> unit ->
Netchannels.pipeThis pipe encodes the data written into the pipe. * linelength and crlf work as in encode.
class decoding_pipe : ?accept_spaces:bool -> ?plus:char -> ?slash:char -> unit -> Netchannels.pipeThis pipe decodes the data written into the pipe. * url_variant and accept_spaces work as in decode.