
    vpiH                     D    d dl mZ d dl mZ d dl mZ d Zd	dZd	dZd Zy)
   )encode)number_types)packerc                 L    t        j                  t        j                  | |      S )z&Extract the size prefix from a buffer.)r   Getr   int32bufoffsets     R/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/flatbuffers/util.pyGetSizePrefixr      s    	FLL#v	..    c                     |r|t         j                  j                  z  }|t         j                  j                  z  }|t        j                  z   }| || S )z)Extract the file_identifier from a buffer)r   UOffsetTFlags	bytewidthr   FILE_IDENTIFIER_LENGTH)r
   r   size_prefixedends       r   GetBufferIdentifierr      sM    
l((222FL&&000&...#	VCr   c                 (    t        | ||      }||k(  S )N)r   )r   )r
   r   file_identifierr   gots        r   BufferHasIdentifierr   %   s    C}E#		r   c                 @    | |t         j                  j                  z   fS )zhCreate a slice of a size-prefixed buffer that has

  its position advanced just past the size prefix.
  )r   
Int32Flagsr   r	   s     r   RemoveSizePrefixr   *   s     
 
f|..888	88r   N)F) r   r   r   r   r   r   r    r   r   <module>r      s$      /
	 
9r   