def do_lzop_put(creds, url, local_path, gpg_key):
assert url.endswith('<STR_LIT>')<EOL>blobstore = get_blobstore(storage.StorageLayout(url))<EOL>with tempfile.NamedTemporaryFile(<EOL>mode='<STR_LIT>', buffering=pipebuf.PIPE_BUF_BYTES) as tf:<EOL><INDENT>with pipeline.get_upload_pipeline(<EOL>open(local_path, '<STR_LIT:rb>'), tf, gpg_key=gpg_key):<EOL><INDENT>pass<EOL><DEDENT>tf.flush()<EOL>clock_start = time.time()<EOL>tf.seek(<NUM_LIT:0>)<EOL>k = blobstore.uri_put_file(creds, url, tf)<EOL>clock_finish = time.time()<EOL>kib_per_second = format_kib_per_second(<EOL>clock_start, clock_finish, k.size)<EOL>return kib_per_second<EOL><DEDENT>
Compress and upload a given local path.

:type url: string
:param url: A (s3|wabs)://bucket/key style URL that is the destination

:type local_path: string
:param local_path: a path to a file to be compressed