The CreateShipment and GetShipment operations return a shipping label file in PDF, PNG,
or ZPL format, depending on the carrier. Amazon compresses the document data before
returning it as a Base64-encoded string.
To extract document data from a compressed file
Decode the Base64-encoded string.
Save the decoded string with a “.gzip” extension.
Extract the PDF, PNG, or ZPL file from the GZIP file.
CreateShipment and GetShipment also return a
Base64-encoded MD5 hash to validate the document data.