F -)q55.5.0+dev0-2025-04-28/&Buffer!tA;@@@A@@@@@7../../stdlib/buffer.mlim--m-3@@@@&Buffer@@A@&create@#int@@@&Buffer!t@@@@@@pZZpZo@@A@@(contents@&Buffer!t@@@&string@@@@@@4~ f f5~ f @@3B@@(to_bytes@&Buffer!t@@@%bytes@@@@@@MB  NB  @@LC@@#sub@&Buffer!t@@@@U@@@@\@@@@@@@@@@@@@@sG m mtG m @@rD@@$blit@&Buffer!t@@@@{@@@@H@@@@@@@@@@@$unit@@@@@@@@@@@@@@M s sM s @@E@@#nth@&Buffer!t@@@@@@@$char@@@@@@@@WW6@@F@@&length@&Buffer!t@@@@@@@@@\\@@G@@%clear@&Buffer!t@@@Q@@@@@@__@@H@@%reset@&Buffer!t@@@i@@@@@@b--b-B@@I@@-output_buffer@&Stdlib+out_channel@@@@&Buffer!t@@@@@@@@@@@2i3i@@1J@@(truncate@&Buffer!t@@@@:@@@@@@@@@@@Qm&&Rm&E@@PK@@(add_char@&Buffer!t@@@@@@@@@@@@@@@pyqy@@oL@@/add_utf_8_uchar<@&Buffer!t@@@@&Stdlib%Uchar!t@@@z@@@{@@|@@}@|""|"L@@M@@2add_utf_16le_uchar=@&Buffer!t@@@~@&Stdlib%Uchar!t@@@@@@@@@@@@@N@@2add_utf_16be_uchar>@&Buffer!t@@@@&Stdlib%Uchar!t@@@5@@@@@@@@@@O@@*add_string?@&Buffer!t@@@@@@@T@@@@@@@@@@P@@)add_bytes@@&Buffer!t@@@@@@@s@@@@@@@@@@Q@@-add_substringA@&Buffer!t@@@@@@@@)@@@@0@@@@@@@@@@@@@@@GuuHu@@FR@@,add_subbytesB@&Buffer!t@@@@@@@@V@@@@]@@@@@@@@@@@@@@@tu@@sS@@.add_substituteC@&Buffer!t@@@@@]@@@b@@@@@@i@@@@@@@@@@@@@@@T@@*add_bufferD@&Buffer!t@@@@&Buffer!t@@@@@@@@@@@@@U@@+add_channelE@&Buffer!t@@@@&Stdlib*in_channel@@@@@@@E@@@@@@@@@@@@V@@&to_seq@&Buffer!t@@@&Stdlib#Seq!tG@@@ @@@ @@ @[[[w@@W@@'to_seqi@&Buffer!t@@@ &Stdlib#Seq!t@#@@@ ⠠@u@@@ @@ @@@ @@ @=  > 0@@;**?;**@@=h@@@33Extensible buffers.@ This module implements buffers that automatically expand as necessary. It provides accumulative concatenation of strings in linear time (instead of quadratic time when strings are concatenated pairwise). For example:@! let concat_strings ss = let b = Buffer.create 16 in List.iter (Buffer.add_string b) ss; Buffer.contents b @@@@@@@@@@@5unsynchronized_access ;Unsynchronized accesses to buffers are a programming error.@A7../../stdlib/buffer.mli7Unsynchronized accesses@@ Unsynchronized accesses to a buffer may lead to an invalid buffer state. Thus, concurrent accesses to a buffer must be synchronized (for instance with a 'Mutex.t@@").@#(Buffer.t3=The abstract type of buffers.@@@@@@@@@@@@@@A@@xv@@-Buffer.create3(create n 1 returns a fresh buffer, initially empty. The !n parameter is the initial size of the internal byte sequence that holds the buffer contents. That byte sequence is automatically reallocated when more than !n = characters are stored in the buffer, but shrinks back to !n1 characters when %reset % is called. For best performance, !n  should be of the same order of magnitude as the number of characters that are expected to be stored in the buffer (for instance, 80 for a buffer that holds one output line). Nothing bad will happen if the buffer grows beyond that limit, however. In doubt, take &n = 165 for instance. If !n6 is not between 1 and 5Sys.max_string_length@@ ), it will be clipped to that interval.@@@@@@@@@@@@@ @@@@/Buffer.contents3 XReturn a copy of the current contents of the buffer. The buffer itself is unchanged.@@@@@@@@@@@@@@@@@/Buffer.to_bytes3 XReturn a copy of the current contents of the buffer. The buffer itself is unchanged.@@@@$4.02@@@@@@@@!@@@@*Buffer.sub34Buffer.sub b off len3 returns a copy of #len 3 bytes from the current contents of the buffer !b5, starting at offset #off!.@@@@@@@@0Invalid_argument#if #off% and #len ' do not designate a valid range of !b!.@@@@@@]@`@c@@@@+Buffer.blit3 %Buffer.blit src srcoff dst dstoff len( copies #len 7 characters from the current contents of the buffer #src5, starting at offset &srcoff' to #dst8, starting at character &dstoff!.@@@@&3.11.2@@@0Invalid_argument#if &srcoff% and #len & do not designate a valid range of #src(, or if &dstoff% and #len & do not designate a valid range of #dst!.@@@@@@@@@@@@@@ޠ*Buffer.nth3 %Get the n-th character of the buffer.@@@@@@@@0Invalid_argument:if index out of bounds@@@@@@@@@@@֠-Buffer.length3 BReturn the number of characters currently contained in the buffer.@@@@@@@@@@@@@@@@@͠,Buffer.clear31Empty the buffer.@@@@@@@@@@@@@@@@@Ġ,Buffer.reset3 Empty the buffer and deallocate the internal byte sequence holding the buffer contents, replacing it with the initial internal byte sequence of length !n7 that was allocated by RD@! !n 7. For long-lived buffers that may have grown a lot, %reset > allows faster reclamation of the space used by the buffer.@@@@@@@@@@@@@(@@@@Ӡ4Buffer.output_buffer32output_buffer oc b ' writes the current contents of buffer !b: on the output channel "oc!.@@@@@@@@@@@@@F@I@@@@Ҡ/Buffer.truncate3.truncate b len9 truncates the length of !b$ to #len 5 Note: the internal byte sequence is not shortened.@@@@$4.05@@@0Invalid_argument#if 'len < 0$ or .len > length b!.@@@@@@{@~@@@@蠙A@)Appending@@*Note: all %add_*6 operations can raise 'Failure K if the internal byte sequence of the buffer would need to grow beyond 5Sys.max_string_length@@!.@/Buffer.add_char3,add_char b c7 appends the character !c6 at the end of buffer !b!.@@@@@@@@@@@@@@@@@@6Buffer.add_utf_8_uchar33add_utf_8_uchar b u- appends the #https://tools.ietf.org/html/rfc3629* UTF-8@- encoding of !u6 at the end of buffer !b!.@@@@$4.06@@@@@@@#@$@@@@@9Buffer.add_utf_16le_uchar36add_utf_16le_uchar b u1 appends the #https://tools.ietf.org/html/rfc2781(UTF-16LE@- encoding of !u: at the end of buffer !b!.@@@@$4.06@@@@@@@+@,@%@@@@9Buffer.add_utf_16be_uchar36add_utf_16be_uchar b u1 appends the #https://tools.ietf.org/html/rfc2781(UTF-16BE@- encoding of !u: at the end of buffer !b!.@@@@$4.06@@@@@@@3@>4@A-@@@@ 1Buffer.add_string3.add_string b s4 appends the string !s6 at the end of buffer !b!.@@@@@@@@@@@@0@_1@b*@@@@"0Buffer.add_bytes3-add_bytes b s; appends the byte sequence !s6 at the end of buffer !b!.@@@@$4.02@@@@@@@4@5@.@@@@&4Buffer.add_substring39add_substring b s ofs len' takes #len; characters from offset #ofs+ in string !s ' and appends them at the end of buffer !b!.@@@@@@@@0Invalid_argument#if #ofs% and #len ' do not designate a valid range of !s!.@@@@@Z@[@T@P@L@@@@D3Buffer.add_subbytes38add_subbytes b s ofs len' takes #len< characters from offset #ofs2 in byte sequence !s ' and appends them at the end of buffer !b!.@@@@$4.02@@@0Invalid_argument#if #ofs% and #len ' do not designate a valid range of !s!.@@@@@z@{@t@p@l@@@@d5Buffer.add_substitute34add_substitute b f s< appends the string pattern !s9 at the end of buffer !b with substitution. The substitution process looks for variable references in the pattern and substitutes each variable reference with its value, as obtained by applying the mapping !f [ to the variable name. Inside the string pattern, a variable reference is a non-escaped !$ K immediately followed by a variable name, which is one of the following: (a non empty sequence of alphanumeric or !_, characters,@ san arbitrary sequence of characters enclosed by a pair of matching parentheses or curly brackets. An escaped !$0 character is a !$ b that immediately follows a backslash character; the two characters together stand for a plain !$!.@@@@@@@@@@@@@@@i@l@o@@@@1Buffer.add_buffer30add_buffer b1 b2 ( appends the current contents of buffer "b29 at the end of buffer "b1#. "b21 is not modified.@@@@@@@@@@@@@@@@@@2Buffer.add_channel32add_channel b ic n/ reads at most !n & characters from the input channel "ic & and stores them at the end of buffer !b!.@@@@@@@@+End_of_file #if the channel contains fewer than !n k characters. In this case, the characters are still added to the buffer, so as to avoid loss of data.@0Invalid_argument#if 'len < 0$ or ;len > Sys.max_string_length!.@@@@@@@@@@@@A@5Buffers and Sequences@@-Buffer.to_seq3 +Iterate on the buffer, in increasing order.@ N The behavior is not specified if the buffer is modified during iteration.@@@@$4.07@@@@@@@@@@@@.Buffer.to_seqi3 IIterate on the buffer, in increasing order, yielding indices along chars.@ N The behavior is not specified if the buffer is modified during iteration.@@@@$4.07@@@@@@@@@@@@.Buffer.add_seq37Add chars to the buffer@@@@$4.07@@@@@@@@ @#@@@@w-Buffer.of_seq3 "Create a buffer from the generator@@@@$4.07@@@@@@@z@4{@@@@eA@;Binary encoding of integers@@ QThe functions in this section append binary encodings of integers to buffers.@ Little-endian (resp. big-endian) encoding means that least (resp. most) significant bytes are stored first. Big-endian is also known as network byte order. Native-endian encoding is either little-endian or big-endian depending on .Sys.big_endian@@!.@ 7 32-bit and 64-bit integers are represented by the %int32) and %int64 J types, which can be interpreted either as signed or unsigned numbers.@ 6 8-bit and 16-bit integers are represented by the #int type, which has more bits than the binary encoding. Functions that encode these values truncate their inputs to their least significant bytes.@0Buffer.add_uint83-add_uint8 b i ) appends a binary unsigned 8-bit integer !i( to !b!.@@@@$4.08@@@@@@@@@@@@@/Buffer.add_int83,add_int8 b i ' appends a binary signed 8-bit integer !i( to !b!.@@@@$4.08@@@@@@@@@@@@@4Buffer.add_uint16_ne31add_uint16_ne b i < appends a binary native-endian unsigned 16-bit integer !i$ to !b!.@@@@$4.08@@@@@@@@@@@@@4Buffer.add_uint16_be31add_uint16_be b i 9 appends a binary big-endian unsigned 16-bit integer !i$ to !b!.@@@@$4.08@@@@@@@@@@@@@4Buffer.add_uint16_le31add_uint16_le b i < appends a binary little-endian unsigned 16-bit integer !i$ to !b!.@@@@$4.08@@@@@@@@@@@@@3Buffer.add_int16_ne30add_int16_ne b i : appends a binary native-endian signed 16-bit integer !i$ to !b!.@@@@$4.08@@@@@@@@3@6@@@@3Buffer.add_int16_be30add_int16_be b i 7 appends a binary big-endian signed 16-bit integer !i$ to !b!.@@@@$4.08@@@@@@@@V@Y@@@@3Buffer.add_int16_le30add_int16_le b i : appends a binary little-endian signed 16-bit integer !i$ to !b!.@@@@$4.08@@@@@@@@y@|@@@@3Buffer.add_int32_ne30add_int32_ne b i 3 appends a binary native-endian 32-bit integer !i$ to !b!.@@@@$4.08@@@@@@@@@@@@@3Buffer.add_int32_be30add_int32_be b i 0 appends a binary big-endian 32-bit integer !i$ to !b!.@@@@$4.08@@@@@@@@@@@@@3Buffer.add_int32_le30add_int32_le b i 3 appends a binary little-endian 32-bit integer !i$ to !b!.@@@@$4.08@@@@@@@@@@@@@3Buffer.add_int64_ne30add_int64_ne b i 3 appends a binary native-endian 64-bit integer !i$ to !b!.@@@@$4.08@@@@@@@@@@@@@à3Buffer.add_int64_be30add_int64_be b i 0 appends a binary big-endian 64-bit integer !i$ to !b!.@@@@$4.08@@@@@@@@(@+@@@@Ǡ3Buffer.add_int64_le30add_int64_ne b i 3 appends a binary little-endian 64-bit integer !i$ to !b!.@@@@$4.08@@@@@@@@K@N@@@@@@@@A%Uchar#Seq@@@@@