When I get a file from aws s3 I get it in format as follows:
b'\x1f\x8b\x08\x00\x0e@\xfd[\x00\x03\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00'
What exactly is this?
Also when getting data -unzip - upload back to s3 it can be done by using:
s3 = boto3.client('s3', use_ssl=False)
s3.upload_fileobj(
Fileobj = gzip.GzipFile(
None,
'rb',
fileobj=BytesIO(s3.get_object(Bucket=bucket, Key=gzipped_key)['Body'].read())),
Bucket=bucket,
Key=uncompressed_key)
I get b'\x1f\x8b\x08\x00\x0e@\xfd[\x00\x03\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00' when I run s3.get_object(Bucket=bucket) line but why wrap that around BytesIO?