Ë
    BÆVhÒ  ã                   ó,   — d Z ddlmZ ddlmZ d„ Zd„ Zy)z7Ops for compressing and uncompressing dataset elements.é    )Ú	structure)Úgen_experimental_dataset_opsc                 ó‚   — t        j                  | «      }t        j                  || «      }t        j                  |«      S )a   Compress a dataset element.

  Args:
    element: A nested structure of types supported by Tensorflow.

  Returns:
    A variant tensor representing the compressed element. This variant can be
    passed to `uncompress` to get back the original element.
  )r   Útype_spec_from_valueÚto_tensor_listÚged_opsÚcompress_element)ÚelementÚelement_specÚtensor_lists      úg/home/dcms/DCMS/lib/python3.12/site-packages/tensorflow/python/data/experimental/ops/compression_ops.pyÚcompressr      s7   € ô ×/Ñ/°Ó8€,Ü×(Ñ(¨°wÓ?€+Ü	×	!Ñ	! +Ó	.Ð.ó    c                 ó²   — t        j                  |«      }t        j                  |«      }t        j                  | ||¬«      }t        j
                  ||«      S )aE  Uncompress a compressed dataset element.

  Args:
    element: A scalar variant tensor to uncompress. The element should have been
      created by calling `compress`.
    output_spec: A nested structure of `tf.TypeSpec` representing the type(s) of
      the uncompressed element.

  Returns:
    The uncompressed element.
  )Úoutput_typesÚoutput_shapes)r   Úget_flat_tensor_typesÚget_flat_tensor_shapesr   Úuncompress_elementÚfrom_tensor_list)r
   Úoutput_specÚ
flat_typesÚflat_shapesr   s        r   Ú
uncompressr   #   sO   € ô ×.Ñ.¨{Ó;€*Ü×0Ñ0°Ó=€+Ü×*Ñ*Ø˜J°kôC€+ä	×	#Ñ	# K°Ó	=Ð=r   N)Ú__doc__Útensorflow.python.data.utilr   Útensorflow.python.opsr   r   r   r   © r   r   ú<module>r      s   ðñ >Ý 1Ý Iò/ó>r   