# pydicom.encaps.defragment_data

pydicom.encaps.defragment_data(data: bytes) → bytes

  Read encapsulated data and return the fragments as one continuous bytes.

  Deprecated since version 3.0: This function will be removed in v4.0, Please use `generate_frames()` for generating frame data or `generate_fragments()` for generating fragment data.

  Parameters:

    data (bytes) – The encapsulated pixel data fragments.

  Returns:

    All fragments concatenated together.

  Return type:

    bytes