!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ SafexInternal representation of priority in priority queues. The precedence of a dequeued entry should be specified to " when the entry is enqueued again. For test only Safe4Integer encoding. The first argument is N of prefix. encode 5 10[10] encode 5 1337 [31,154,10] encode 8 42[42]4Integer decoding. The first argument is N of prefix.decode 5 10 $ BS.empty10decode 5 31 $ BS.pack [154,10]1337decode 8 42 $ BS.empty426parseInteger 7 127 $ BS.pack [210,211,212,87,88,89,90](183839313,"XYZ")SafeNone&let bs = BS.pack [0x12,0x34,0xf3,0xab]unpack4bits bs[1,2,3,4,15,3,10,11]unpack4bits $ BS.tail bs[3,4,15,3,10,11]Safe Bit stream.Data type for Bit.ZeroOneFrom  of length 8 to .fromBits [T,F,T,F,T,F,T,F]170fromBits [F,T,F,T,F,T,F,T]85 Safe SafeType for Huffman decoding. Creating .Marking the EOS path   NoneHuffman encoding.toShifted [T,T,T,T] 0Shifted 1 4 "\240"toShifted [T,T,T,T] 4Shifted 1 0 "\SI"toShifted [T,T,T,T] 5Shifted 2 1 "\a\128"Huffman encoding.  None Safe               Safe Safe+8(The data type for HTTP/2 frame payloads. 'The data type for HTTP/2 frame headers. The data type for HTTP/2 frames.!The type for padding in payloads.6The type for fragments of a header encoded with HPACK.The type for stream identifierThe type for flags.The type for frame type.&The type for raw frame type.'Type for stream priority,>The type for weight in priority. Its values are from 1 to 256.-The type for window size..NCooked version of settings. This is suitable to be stored in a HTTP/2 context.6Association list of SETTINGS.7 The type for raw SETTINGS value.8The type for SETTINGS key.?)The connection error or the stream error.BThe type for error code. See  -https://tools.ietf.org/html/rfc7540#section-7.RThe type for raw error code.S"The length of HTTP/2 frame header.frameHeaderLength9T Converting B to R.fromErrorCodeId NoError0"fromErrorCodeId InadequateSecurity12U Converting R to B.toErrorCodeId 0NoErrortoErrorCodeId 0xcInadequateSecuritytoErrorCodeId 0xeUnknownErrorCode 14V Obtaining B from ?.W Converting 8 to raw value.)fromSettingsKeyId SettingsHeaderTableSize1,fromSettingsKeyId SettingsMaxHeaderBlockSize6XConverting raw value to 8.toSettingsKeyId 0NothingtoSettingsKeyId 1Just SettingsHeaderTableSizetoSettingsKeyId 6Just SettingsMaxHeaderBlockSizetoSettingsKeyId 7NothingY Checking 6 and reporting an error if any.*checkSettingsList [(SettingsEnablePush,2)]AJust (ConnectionError ProtocolError "enable push must be 0 or 1")ZThe default settings.defaultSettingsSettings {headerTableSize = 4096, enablePush = True, maxConcurrentStreams = Nothing, initialWindowSize = 65535, maxFrameSize = 16384, maxHeaderBlockSize = Nothing}[Updating settings.XupdateSettings defaultSettings [(SettingsEnablePush,0),(SettingsMaxHeaderBlockSize,200)]Settings {headerTableSize = 4096, enablePush = False, maxConcurrentStreams = Nothing, initialWindowSize = 65535, maxFrameSize = 16384, maxHeaderBlockSize = Just 200}\ The default initial window size.defaultInitialWindowSize65535]The maximum window size. maxWindowSize 2147483647^:Checking if a window size exceeds the maximum window size.isWindowOverflow 10FalseisWindowOverflow maxWindowSizeFalse$isWindowOverflow (maxWindowSize + 1)True_Default concurrency.recommendedConcurrency100`+Default priority which depends on stream 0.defaultPriority?Priority {exclusive = False, streamDependency = 0, weight = 16}a+Highest priority which depends on stream 0.highestPriority@Priority {exclusive = False, streamDependency = 0, weight = 256}b Converting  to &.fromFrameTypeId FrameData0!fromFrameTypeId FrameContinuation9!fromFrameTypeId (FrameUnknown 10)10c Converting & to .toFrameTypeId 0 FrameDatatoFrameTypeId 9FrameContinuationtoFrameTypeId 10FrameUnknown 10d%The maximum length of HTTP/2 payload.maxPayloadLength16384e-The initial value of flags. No flags are set. defaultFlags0fDChecking if the END_STREAM flag is set. >>> testEndStream 0x1 Trueg7Checking if the ACK flag is set. >>> testAck 0x1 Trueh(Checking if the END_HEADERS flag is set.testEndHeader 0x4Truei#Checking if the PADDED flag is set.testPadded 0x8Truej%Checking if the PRIORITY flag is set.testPriority 0x20TruekSetting the END_STREAM flag.setEndStream 01lSetting the ACK flag.setAck 01mSetting the END_HEADERS flag.setEndHeader 04nSetting the PADDED flag. setPadded 08oSetting the PRIORITY flag. setPriority 032p.Checking if the stream identifier for control. isControl 0True isControl 1Falseq.Checking if the stream identifier for request. isRequest 0False isRequest 1Truer/Checking if the stream identifier for response. isResponse 0False isResponse 2Trues&Checking if the exclusive flag is set.tSetting the exclusive flag.uClearing the exclusive flag.vGetting & from .,framePayloadToFrameTypeId (DataFrame "body") FrameDataw2Checking if padding is defined in this frame type.isPaddingDefined $ DataFrame ""TrueisPaddingDefined $ PingFrame ""False}  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwy  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvw>    !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwSafe x&Abstract data type for priority trees.yDefault precedence.z Converting ' to R. When an entry is enqueued at the first time, this function should be used.{Creating a new priority tree.|XBringing up the structure of the priority tree. This must be used for Priority frame.}OEnqueuing an entry to the priority tree. This must be used for Header frame.~'Checking if the priority tree is empty.'Checking if the priority tree is empty.*Dequeuing an entry from the priority tree.*Dequeuing an entry from the priority tree.$Deleting the entry corresponding to .  and }5 are used to change the priority of a live stream.x yz{|}~ xyz{|}~ yzx{|}~x yz{|}~None )Auxiliary information for frame encoding.!Flags to be set in a frame header%Stream id to be set in a frame headerPadding if any. In the case where this value is set but the priority flag is not set, this value gets preference over the priority flag. So, if this value is set, the priority flag is also set.A smart builder of .encodeInfo setAck 0IEncodeInfo {encodeFlags = 1, encodeStreamId = 0, encodePadding = Nothing}Encoding an HTTP/2 frame to !f. This function is not efficient enough for high performace program because of the concatenation of !.0encodeFrame (encodeInfo id 1) (DataFrame "body")*"\NUL\NUL\EOT\NUL\NUL\NUL\NUL\NUL\SOHbody"Encoding an HTTP/2 frame to [!$]. This is suitable for sendMany.GEncoding an HTTP/2 frame header. The frame header must be completed.zWriting an encoded HTTP/2 frame header to the buffer. The length of the buffer must be larger than or equal to 9 bytes.`Encoding an HTTP/2 frame payload. This returns a complete frame header and chunks of payload."stream identifier#$Payload length.%&'()*+,-./012345 "#$%&'()*+,-./012345NoneF#The type for frame payload decoder.Decoding an HTTP/2 frame to !. The second argument must be include the entire of frame. So, this function is not useful for real applications but useful for testing.8Decoding an HTTP/2 frame header. Must supply 9 bytes.6Checking a frame header and reporting an error if any.BcheckFrameHeader defaultSettings (FrameData,(FrameHeader 100 0 0))DLeft (ConnectionError ProtocolError "cannot used in control stream")Decoding an HTTP/2 frame payload. This function is considered to return a frame payload decoder according to a frame type.%Frame payload decoder for DATA frame.(Frame payload decoder for HEADERS frame.)Frame payload decoder for PRIORITY frame.+Frame payload decoder for RST_STREAM frame.)Frame payload decoder for SETTINGS frame.-Frame payload decoder for PUSH_PROMISE frame.%Frame payload decoder for PING frame.'Frame payload decoder for GOAWAY frame..Frame payload decoder for WINDOW_UPDATE frame.-Frame payload decoder for CONTINUATION frame.6Helper function to pull off the padding if its there, and will eat up the trailing padding automatically. Calls the decoder func passed in with the length of the unpadded portion between the padding octet and the actual paddingHTTP/2 settingsInput byte-stream Decoded frame789:;<6=>?@AB789:;<6=>?@ABNoneThe preface of HTTP/2.connectionPreface""PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n"Length of the preface.connectionPrefaceLength24  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvw  w !"#$%v&bc'()*+,`apqrstuefghijklmno689:;<=>7WXY./012345Z[-\]^RBCDEFGHIJKLMNOPQTU?@AVSd_Safe+Errors for decoder.Index is out of range+Eos appears in the middle of huffman string,Non-eos appears in the end of huffman string)Eos of huffman string is more than 7 bitsEncoded string has no lengthHeader block is empty<A peer tried to change the dynamic table size over the limit&Table size update at the non-beginningStrategy for HPACK encoding.$Which compression algorithm is used.3Whether or not to use Huffman encoding for strings.*Compression algorithms for HPACK encoding.No compressionUsing the static table onlyUsing indices onlyIndex for table.CTo be a  or . Header list.Header. Header value. Header name.Default .defaultEncodeStrategy<EncodeStrategy {compressionAlgo = Linear, useHuffman = True}CDC CDNoneEHuffman decoding.FHuffman decoding.GHIJKLMENFOPQRSEF GHIJKLMENFOPQRSNoneEFSafeTIndex or literal.U!Whether or not adding to a table.VType for representation.WType for header block.XEmpty header block. TYZU[\]V^_`WXTYZU[\]V^_`WXTYZU[\]V^_`WXNonea Encoding C to ! according to HuffmanEncoding.bParsing C from !. The second c: is whether or not huffman encoding is used. The third d% is the length of the encoded string.abababNonee#Converting the low level format to W.f#Converting the low level format to W. W! forms a pair with corresponding !.efghijklmnopqrstuvefefghijklmnopqrstuvNonew Converting W to the low level format.xwyz{|}~wyxwyz{|}~Safe >Type for table entry. Size includes the 32 bytes magic number.Size in bytes.From  to .From  to .Getting the size of .Getting .Getting .Getting .Dummy  to initialize a dynamic table.2How many entries can be stored in a dynamic table?  SafeThe size of static table.Get  from the static table.toStaticEntry (SIndex 1)(42,(":authority",""))toStaticEntry (SIndex 8)(42,(":status","200"))toStaticEntry (SIndex 50)(37,("range",""))Pre-defined static table. Safe  None4FType for dynamic table.An array Start pointThe current number of entriesThe size of the array1The current dynamic table size (defined in HPACK)-The max dynamic table size (defined in HPACK)8The value informed by SETTINGS_HEADER_TABLE_SIZE. If , dynamic table size update is not necessary. Otherwise, dynamic table size update is sent and this value should be set to ..The limit size of a dynamic table for decodingjHeader to the index in Dynamic Table for encoder. Static Table is not included. Nothing for decoder. Printing .eWhen SETTINGS_HEADER_TABLE_SIZE is received from a peer, its value should be set by this function. Creating . Creating . Renewing  with necessary entries copied.Is the size of  really changed? Inserting  to  . New , the largest new  and a set of dropped OLD  are returned.* NoneF)Is header key-value stored in the tables?Which table does  refer to?MResolving an index from a header. Static table is prefer to dynamic table.Which table does  belong to? &None Decoding W to .Decoding step for one V$. Exporting for the test purpose.None Encoding  to W.   NoneTYZU[\]V^_`WXefwyNoneHPACK decoding from ! to .HPACK encoding from  to .HPACK encoding from  to !.RDefault dynamic table size. The value is 4,096 bytes: an array has 128 entries.defaultDynamicTableSize4096 Converting ) for HTTP header to the low level format. Converting ' for HTTP header to bytestring builder.3Converting the low level format for HTTP header to .  would be thrown.##!"#$%&'()*+,-../01223456789:;<=>?@ABCDEFFGHIJKLLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!IJ                                !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRRSTUVWXYZ[\]^_`abcdefghijklmklnopqrstuvwxyz{|}~wxM+http2_2wBUxcHXLbKDA8Iu6ElxWQNetwork.HTTP2.Priority Network.HTTP2 Network.HPACKNetwork.HTTP2.Priority.PSQ!Network.HPACK.HeaderBlock.IntegerNetwork.HPACK.Huffman.Params Network.HPACK.Huffman.ByteStringNetwork.HPACK.Huffman.BitNetwork.HPACK.Huffman.TableNetwork.HPACK.Huffman.TreeNetwork.HPACK.Huffman.EncodeNetwork.HPACK.Builder.Word8Network.HPACK.BuilderNetwork.HTTP2.Priority.QueueNetwork.HTTP2.TypesNetwork.HTTP2.EncodeNetwork.HTTP2.DecodeNetwork.HPACK.TypesNetwork.HPACK.Huffman.DecodeNetwork.HPACK.Huffman%Network.HPACK.HeaderBlock.HeaderField Network.HPACK.HeaderBlock.String Network.HPACK.HeaderBlock.Decode Network.HPACK.HeaderBlock.EncodeNetwork.HPACK.Table.EntryNetwork.HPACK.Table.StaticNetwork.HPACK.Table.RevIndexNetwork.HPACK.Table.DynamicNetwork.HPACK.TableNetwork.HPACK.HeaderBlock.FromNetwork.HPACK.HeaderBlock.ToNetwork.HPACK.HeaderBlock Precedence FramePayload DataFrame HeadersFrame PriorityFrameRSTStreamFrame SettingsFramePushPromiseFrame PingFrame GoAwayFrameWindowUpdateFrameContinuationFrame UnknownFrame FrameHeader payloadLengthflagsstreamIdFrame frameHeader framePayloadPaddingHeaderBlockFragmentStreamId FrameFlags FrameTypeId FrameData FrameHeaders FramePriorityFrameRSTStream FrameSettingsFramePushPromise FramePing FrameGoAwayFrameWindowUpdateFrameContinuation FrameUnknown FrameTypePriority exclusivestreamDependencyweightWeight WindowSizeSettingsheaderTableSize enablePushmaxConcurrentStreamsinitialWindowSize maxFrameSizemaxHeaderBlockSize SettingsList SettingsValue SettingsKeyIdSettingsHeaderTableSizeSettingsEnablePushSettingsMaxConcurrentStreamsSettingsInitialWindowSizeSettingsMaxFrameSizeSettingsMaxHeaderBlockSize HTTP2ErrorConnectionError StreamError ErrorCodeIdNoError ProtocolError InternalErrorFlowControlErrorSettingsTimeout StreamClosedFrameSizeError RefusedStreamCancelCompressionError ConnectErrorEnhanceYourCalmInadequateSecurityHTTP11RequiredUnknownErrorCode ErrorCodeframeHeaderLengthfromErrorCodeId toErrorCodeId errorCodeIdfromSettingsKeyIdtoSettingsKeyIdcheckSettingsListdefaultSettingsupdateSettingsdefaultInitialWindowSize maxWindowSizeisWindowOverflowrecommendedConcurrencydefaultPriorityhighestPriorityfromFrameTypeId toFrameTypeIdmaxPayloadLength defaultFlags testEndStreamtestAck testEndHeader testPadded testPriority setEndStreamsetAck setEndHeader setPadded setPriority isControl isRequest isResponse testExclusive setExclusiveclearExclusiveframePayloadToFrameTypeIdisPaddingDefined PriorityTreedefaultPrecedence toPrecedencenewPriorityTreeprepareenqueueisEmpty isEmptySTMdequeue dequeueSTMdelete EncodeInfo encodeFlagsencodeStreamId encodePadding encodeInfo encodeFrameencodeFrameChunksencodeFrameHeaderencodeFrameHeaderBufencodeFramePayloadFramePayloadDecoder decodeFramedecodeFrameHeadercheckFrameHeaderdecodeFramePayloaddecodeDataFramedecodeHeadersFramedecodePriorityFramedecoderstStreamFramedecodeSettingsFramedecodePushPromiseFramedecodePingFramedecodeGoAwayFramedecodeWindowUpdateFramedecodeContinuationFrameconnectionPrefaceconnectionPrefaceLength DecodeError IndexOverrunEosInTheMiddle IllegalEos TooLongEosEmptyEncodedString EmptyBlockTooLargeTableSizeIllegalTableSizeUpdateEncodeStrategycompressionAlgo useHuffmanCompressionAlgoNaiveStaticLinearIndex HeaderListHeader HeaderValue HeaderNamedefaultEncodeStrategySize DynamicTablesetLimitForEncodingnewDynamicTableForEncodingnewDynamicTableForDecoding HPACKDecodingHPACKEncodingBuilder HPACKEncodingdefaultDynamicTableSize encodeHeaderencodeHeaderBuilder decodeHeader newPrecedence PriorityQueue baseDeficitqueueHeapdeficit dependencyDeficitKey deficitSteps deficitList deficitTableweightToDeficit deficitLimitempty$fOrdPrecedence$fEqPrecedenceencodedecode parseInteger powerArrayencode'decode'idxEos unpack4bitsc_memcpycopymemcpyBitsBFTfromBitsbaseGHC.WordWord8fromBit huffmanTableHTreetoHTreemarkTipBinEOSInfoeosInfoshowTree showTree' printTreebuildflattenHuffmanEncoding toShiftedShifted ShiftedArrayAOSAaosatoShiftedArray Word8Builder<|w8empty toByteStringBuilder<< singletonrunTPriorityQueuenewminSettingsKeyIdmaxSettingsKeyIdcheckSettingsValue minFrameType maxFrameType$fExceptionHTTP2ErrorElementChildParentTNestedPriorityQueueGluebytes_6elQVSg5cWdFrvRnfxTUrHData.ByteString.Internal ByteStringbuildFramePayload buildPadding buildPrioritybuildFramePayloadDatabuildFramePayloadHeadersbuildFramePayloadPrioritybuildFramePayloadRSTStreambuildFramePayloadSettingsbuildFramePayloadPushPromisebuildFramePayloadPingbuildFramePayloadGoAwaybuildFramePayloadWindowUpdatebuildFramePayloadContinuationbuildFramePayloadUnknownpoke8poke16poke24poke32 bytestring4decodeWithPadding+.zeroFrameTypesnonZeroFrameTypespayloadDecodersdecodeUnknownFramecheckFrameSizestreamIdentifierpriority intFromWord8word32word32'word16' HeaderStuff$fExceptionDecodeErrorHuffmanDecodingWay256Way16Pin EndOfStringForwardGoBacknextdecway256 constructstepbits4sNamingIndexing HeaderField HeaderBlockemptyHeaderBlockIdxLitAddNotAddNeverChangeTableSizeIndexedLiteral parseStringghc-prim GHC.TypesBoolIntfromByteStringfromByteStringDebug toHeaderFieldindexedincrementalIndexingmaxSizewithoutIndexing neverIndexing indexedNamenewName headerStuffmask6mask5mask4isIndexedName1isIndexedName2 isHuffman dropHuffmanSetter toBuilderfromHeaderFieldword8schangeindexset1set01set001set0001set0000setHEntrytoEntry fromEntry entrySize entryHeaderentryHeaderNameentryHeaderValue dummyEntry maxNumbersheaderSizeMagicNumber headerSizestaticTableSize toStaticEntry staticTableSIndexfromSIndexToIndexfromIndexToSIndex isSIndexValidstaticTableListOuterInnerDIndexdefaultRevIndex insertDynamic deleteDynamicdeleteDynamicList circularTableoffset numOfEntriesmaxNumOfEntriesmaxDynamicTableSizelimitForEncodingGHC.BaseNothinglimitForDecoding reverseIndexprintDynamicTablerenewDynamicTable shouldRenew insertEntryTableSizeActionKeepChangeIgnoreTablefromDIndexToIndexfromIndexToDIndexadj printEntryisDynamicTableEmptyisSuitableSizeneedChangeTableSizegetLimitForEncodingresetLimitForEncodingnewDynamicTable copyTable getEntries copyEntries insertFrontadjustTableSizeadjust insertEnd removeEnd toHeaderEntry HeaderCache WhichTable lookupTablewhichNoneKeyOnlyKeyValueInDynamicTable InStaticTableisInfromHeaderBlock decodeStepStepCtx decodeLoop decodeFinal fromNaming toHeaderBlocktoHeaderBlock' encodeFinal encodeLoop naiveStep staticStep linearStep smartStepcheckheadersNotToIndex Data.ByteString.Builder.Internal