gzip
The command that compresses a single file and replaces it with a smaller .gz version; gunzip reverses it.
In more detail
It works on one file at a time, so directories are bundled with tar first. The original file is removed unless you pass -k, and gunzip restores it byte for byte.
Examples
gzip copy.txtgunzip copy.txt.gzKafka producers can compress batches with it: KafkaProducer(compression_type='gzip').Related terms
- tar — The command that bundles a directory tree into a single archive file, lists one, or unpacks one.
- tarball — A tar archive compressed with gzip, usually named .tar.gz or .tgz.
- compression.type — The producer setting that compresses each batch with a codec such as gzip, snappy, lz4 or zstd before sending it.
- record batch — A group of records sent to the broker together in one request, instead of one request per record.
- DEFLATE — The compression algorithm inside gzip and zip files, which replaces repeated byte sequences with short references to earlier ones.
- Brotli — A compression format designed by Google that usually shrinks text more than gzip, at the cost of slower compression at high quality settings.
- compression — Encoding data in fewer bytes by removing repetition, so it takes less space and less time to send.
Taught in
- Archives, Transfers And The Network — Bash Scripting & Command Line Automation
- Retention Deletes Files, Not Records — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- Batching, Linger And Throughput — Apache Kafka & Event Streaming
- Native Compression: node:zlib & Streaming Codecs — Node.js Internals & Backend Services
- Exam Strategy: Order, Verify, And The Docs You May Use — Red Hat Certified System Administrator (EX200) Exam Prep
- Scheduling: cron, at And systemd Timers — Red Hat Certified System Administrator (EX200) Exam Prep
- Friday's Backup, Monday's Restore: Incrementals, Images And Compressed Logs — CompTIA Linux+ (XK0-006) Exam Prep
- The Cleanup That Emptied The Wrong Directory: Shell Scripts Under Exam Conditions — CompTIA Linux+ (XK0-006) Exam Prep
- Filters: Twenty Small Tools — LPIC-1 Linux Administrator (101-500 and 102-500) Exam Prep
- requirements.yml: Installing Roles And Collections — RHCE in Ansible (EX294): Automate Red Hat Systems
- Archives: archive And unarchive On The Managed Nodes — RHCE in Ansible (EX294): Automate Red Hat Systems
- Scheduling: cron Jobs With Names, And Timers — RHCE in Ansible (EX294): Automate Red Hat Systems
References
Certification courses
- CCDAK and CCAAK course and practice exams: Confluent Apache Kafka certifications
- RHCSA course and practice exam: Red Hat Certified System Administrator (EX200)
- CompTIA Linux+ course and practice exam: XK0-006
- LPIC-1 course and practice exam: Linux Administrator (101-500 and 102-500)
- RHCE course and practice exam: Red Hat Certified Engineer in Ansible (EX294)