+
    QiO	                    *    R t ^ RIHt  ! R R4      tR# )z
An implementation of a bitwise prefix tree specially built for decoding
Huffman-coded content where we already know the Huffman table.
)annotationsc                  2    ] tR t^tRtR R ltR R ltRtR# )HuffmanEncoderz^
Encodes a string according to the Huffman encoding table defined in the
HPACK specification.
c               $    V ^8  d   QhRRRRRR/# )   huffman_code_listz	list[int]huffman_code_list_lengthsreturnNone )formats   "b/Users/mitch_tango/dev/rabbit-r1-livekit/agent/.venv/lib/python3.14/site-packages/hpack/huffman.py__annotate__HuffmanEncoder.__annotate__   s(     C C) CPY C^b C    c                	    Wn         W n        R # )Nr   r   )selfr   r   s   &&&r   __init__HuffmanEncoder.__init__   s    !2)B&r   c                    V ^8  d   QhRRRR/# )r   bytes_to_encodezbytes | Noner	   bytesr   )r   s   "r   r   r      s     .  . l . u . r   c                   V'       g   R# ^ p^ pV F]  pV P                   V,          pV P                  V,          ^V^,           ,          ^,
          ,          pW%,          pW&,          pW5,          pK_  	  ^V^,          ,
          ^,          pW',          pV^V,          ^,
          ,          p\        V4      R,          P                  R4      p\	        V4      ^,          ^ 8w  d
   RV,           MTpW7,           ^,          p	V	^,          p
\	        V4      V
8w  d#   V
\	        V4      ,
          pRV,          V,           p\
        P                  V4      # )zU
Given a string of bytes, encodes them according to the HPACK Huffman
specification.
r   :r   NNL0)r   r   hexrstriplenr   fromhex)r   r   	final_numfinal_int_lenbytebin_int_lenbin_intbits_to_be_paddedstotal_bytesexpected_digitsmissing_digitss   &&          r   encodeHuffmanEncoder.encode   s*    	
 $D88>K,,T2kAo&*G %I I(M $ -!"349'	a,,11	 	N2%%c* 1vzQC!GA
 %8Q>%/q6_$,s1v5N~%*A}}Qr   r   N)__name__
__module____qualname____firstlineno____doc__r   r*   __static_attributes__r   r   r   r   r      s    
C.  . r   r   N)r0   
__future__r   r   r   r   r   <module>r3      s    #8  8 r   