úÎ!uaqL      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKNone"#2lmnË;network-byte-orderBuffer overrun exception.network-byte-orderThe buffer size is not enoughnetwork-byte-order`Read only buffer. To ensure that the internal is not modified, this is an abstract data type. network-byte-orderReading one byte as  and ff one byte. network-byte-orderReading one byte as L; and ff one byte. If buffer overrun occurs, -1 is returned. network-byte-order=Fast forward the offset pointer. The boundary is not checked. network-byte-order%Returning the length of the remaining network-byte-order2Executing an action on the current offset pointer.network-byte-order&Memorizing the current offset pointer.network-byte-order4Getting how many bytes from the saved offset pinter.network-byte-order+Moving the offset point to the saved point.network-byte-orderRead and write buffer.network-byte-orderSize of a buffer.network-byte-order Offset from the current pointer.network-byte-order A pointer to .network-byte-orderlet buf = pack [1,2,3,4]"unsafeWithByteString buf (poke8 0) unpack buf [0,2,3,4]network-byte-orderlet buf = pack [1,2,3,4]-unsafeWithByteString buf (poke16 (7*256 + 8)) unpack buf [7,8,3,4]network-byte-orderlet buf = pack [1,2,3,4]7unsafeWithByteString buf (poke24 (6*65536 + 7*256 + 8)) unpack buf [6,7,8,4]network-byte-orderlet buf = pack [1,2,3,4]7unsafeWithByteString buf (poke32 (6*65536 + 7*256 + 8)) unpack buf [0,6,7,8]network-byte-order let buf = pack [1,2,3,4,5,6,7,8]7unsafeWithByteString buf (poke64 (6*65536 + 7*256 + 8)) unpack buf[0,0,0,0,0,6,7,8]network-byte-orderlet buf = pack [1,2,3,4]unsafeWithByteString buf peek81 network-byte-orderlet buf = pack [1,2,3,4]unsafeWithByteString buf peek16258!network-byte-orderlet buf = pack [1,2,3,4]unsafeWithByteString buf peek2466051"network-byte-orderlet buf = pack [1,2,3,4]unsafeWithByteString buf peek3216909060#network-byte-order let buf = pack [1,2,3,4,5,6,7,8]unsafeWithByteString buf peek6472623859790382856%network-byte-orderlet w = 5 :: Word8unpack $ bytestring8 w[5]&network-byte-order6let w = foldl' (\x y -> x * 256 + y) 0 [5,6] :: Word16unpack $ bytestring16 w[5,6]'network-byte-order:let w = foldl' (\x y -> x * 256 + y) 0 [5,6,7,8] :: Word32unpack $ bytestring32 w [5,6,7,8](network-byte-orderBlet w = foldl' (\x y -> x * 256 + y) 0 [1,2,3,4,5,6,7,8] :: Word64unpack $ bytestring64 w[1,2,3,4,5,6,7,8])network-byte-order let buf = pack [1,2,3,4,5,6,7,8] word8 buf1*network-byte-order let buf = pack [1,2,3,4,5,6,7,8] word16 buf258+network-byte-order let buf = pack [1,2,3,4,5,6,7,8] word32 buf16909060,network-byte-order let buf = pack [1,2,3,4,5,6,7,8] word64 buf72623859790382856-network-byte-orderUsing  as  and call the MV action of the second argument by passing the start point and the offset of the . Note that if a # is created newly, its offset is 0..network-byte-orderjCopying the bytestring to the buffer. This function returns the point where the next copy should start.let buf = "abc" :: ByteStringSunsafeWithByteString buf $ \ptr _ -> Network.ByteOrder.copy ptr "ABC" >> return buf"ABC"/network-byte-order!Converting the part of buffer to % and executing the action with it. let buf = "abcdef" :: ByteString9unsafeWithByteString buf $ \ptr _-> bufferIO ptr 2 return"ab"0network-byte-order.Creating a write buffer with the given buffer.1network-byte-orderReseting a write buffer.2network-byte-order=Write one byte and ff one byte. If buffer overrun occurs,  is thrown.+withWriteBuffer 1 $ \wbuf -> write8 wbuf 65"A"3network-byte-order>Write two bytes and ff one byte. If buffer overrun occurs,  is thrown.9withWriteBuffer 2 $ \wbuf -> write16 wbuf (65 * 256 + 66)"AB"4network-byte-order@Write three bytes and ff one byte. If buffer overrun occurs,  is thrown.FwithWriteBuffer 3 $ \wbuf -> write24 wbuf (65 * 256^2 + 66 * 256 + 67)"ABC"5network-byte-order?Write four bytes and ff one byte. If buffer overrun occurs,  is thrown.SwithWriteBuffer 4 $ \wbuf -> write32 wbuf (65 * 256^3 + 66 * 256^2 + 67 * 256 + 68)"ABCD"6network-byte-order?Write four bytes and ff one byte. If buffer overrun occurs,  is thrown.7network-byte-order³Shifting the N-bytes area just before the current pointer (the 3rd argument). If the second argument is positive, shift it to right. If it is negative, shift it to left. & moves as if it is sticky to the area.OwithWriteBuffer 16 $ \wbuf -> copyByteString wbuf "ABCD" >> shiftLastN wbuf 1 3"ABBCD"OwithWriteBuffer 16 $ \wbuf -> copyByteString wbuf "ABCD" >> shiftLastN wbuf 2 3"ABCBCD"`withWriteBuffer 16 $ \wbuf -> copyByteString wbuf "ABCDE" >> shiftLastN wbuf (-2) 3 >> ff wbuf 2"CDEDE"8network-byte-orderCopy the content of 1 and ff its length. If buffer overrun occurs,  is thrown.6withWriteBuffer 3 $ \wbuf -> copyByteString wbuf "ABC""ABC"9network-byte-orderCopy the content of N1 and ff its length. If buffer overrun occurs,  is thrown.=withWriteBuffer 5 $ \wbuf -> copyShortByteString wbuf "ABCEF""ABCEF":network-byte-orderCopy the area from  to the current pointer to .;network-byte-orderCopy the area from  to the current pointer to N.<network-byte-order3Allocate a temporary buffer and copy the result to .=network-byte-order3Allocate a temporary buffer and copy the result to  with an additional value.:withWriteBuffer' 1 $ \wbuf -> write8 wbuf 65 >> return 'a' ("A",'a')>network-byte-orderGetting the offset pointer.?network-byte-order-Creating a read buffer with the given buffer.@network-byte-order Converting  to  and run the action with it.Anetwork-byte-order Extracting ÿ9 from the current offset. The contents is copied, not shared. Its length is specified by the 2nd argument. If the length is positive, the area after the current pointer is extracted and FF the length finally. If the length is negative, the area before the current pointer is extracted and does not FF.IwithReadBuffer "abcdefg" $ \rbuf -> ff rbuf 1 >> extractByteString rbuf 2"bc"Bnetwork-byte-order Extracting Nÿ9 from the current offset. The contents is copied, not shared. Its length is specified by the 2nd argument. If the length is positive, the area after the current pointer is extracted and FF the length finally. If the length is negative, the area before the current pointer is extracted and does not FF.NwithReadBuffer "abcdefg" $ \rbuf -> ff rbuf 2 >> extractShortByteString rbuf 3"cde"Cnetwork-byte-orderReading two bytes as  and ff two bytes.&withReadBuffer "\x0\x1\x2\x3" $ read161Dnetwork-byte-orderReading three bytes as  and ff three bytes.&withReadBuffer "\x0\x1\x2\x3" $ read24258Enetwork-byte-orderReading four bytes as  and ff four bytes.&withReadBuffer "\x0\x1\x2\x3" $ read3266051Fnetwork-byte-orderReading four bytes as  and ff four bytes.G  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFG !"#$%&'()*+,-./ ?@CDEFAB01<=23456897:;>O       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRPQSTUV/network-byte-order-0.1.5-GALpwQ0SlSnCqygFNSIs56Network.ByteOrderbaseGHC.WordWord8Word16Word32Word64bytestring-0.10.8.2Data.ByteString.Internal ByteString BufferOverrun ReadBufferReadableread8readInt8ff remainingSizewithCurrentOffSetsave savingSizegoBack WriteBufferstartlimitoffset oldoffset BufferSizeOffsetBufferpoke8poke16poke24poke32poke64peek8peek16peek24peek32peek64peekByteString bytestring8 bytestring16 bytestring32 bytestring64word8word16word32word64unsafeWithByteStringcopybufferIOnewWriteBufferclearWriteBufferwrite8write16write24write32write64 shiftLastNcopyByteStringcopyShortByteString toByteStringtoShortByteStringwithWriteBufferwithWriteBuffer' currentOffset newReadBufferwithReadBufferextractByteStringextractShortByteStringread16read24read32read64$fReadableReadBuffer$fExceptionBufferOverrun$fReadableWriteBuffer$fEqBufferOverrun$fShowBufferOverrunghc-prim GHC.TypesIntIOData.ByteString.Short.InternalShortByteString