Keeping What Matters in Smaller Files

Smaller files use less storage and can take less time to transmit. The important decision is what you need back afterward: the exact original file, or an approximation that remains useful. You meet this choice when archiving school records, uploading photographs, or sharing recorded audio. Understanding the difference helps you judge whether a reduction in file size is suitable, rather than assuming the smallest file is always the best choice.

What can be reconstructed?

Lossless compression represents data so that the exact original can be reconstructed from the compressed representation. It can exploit redundancy without discarding information needed to recover the original. A suitable decoder reverses the representation change, restoring every original bit.


Lossy compression reduces the information retained, typically by discarding detail judged less important for the intended use. The reconstructed result is an approximation rather than a guaranteed exact copy. For an image, the visible difference might be subtle at normal viewing size but more noticeable after enlargement or editing.


Two compression paths compare exact reconstruction with an approximation of the original.



Some inputs contain little exploitable repetition or predictability. A compressed file also needs information that tells the decoder how to interpret it. Consequently, compression may produce little saving or even a larger file, especially when the input is already compressed.

Choosing a suitable method

Start with the purpose of the file. If the original must be recovered exactly, choose a lossless method. If approximation is acceptable, a lossy method may offer a useful tradeoff between size and quality. The decision depends on the application, not simply on the file's extension.


Decision

Lossless compression

Lossy compression

Reconstruction

Recovers the exact original

Produces an approximation

Suitable use

Records, program files, editable source data

Viewing or listening copies when approximation is acceptable

Main consideration

Whether enough size reduction is achieved

Whether the reconstructed quality remains acceptable


Keep an original when you may need details that a lossy version discards. Putting an already lossy file into a lossless archive preserves that file exactly; it does not restore information discarded earlier. Repeated lossy processing may cause further changes, so quality should be assessed for the actual workflow.

Measuring the reduction

Let SoS_o be the original size and ScS_c the compressed size. Use the same units for both. An original-to-compressed size ratio and the percentage saved are:


R=SoScR=\frac{S_o}{S_c}


percentage saved=So−ScSo×100%\text{percentage saved}=\frac{S_o-S_c}{S_o}\times100\%


Report the ratio as R:1R:1 and state its order, because descriptions of compression ratios can differ. For example, 4:14:1 in this order means the compressed file occupies one quarter of the original size.


Example: A file shrinks from 10 MB10\ \text{MB} to 8 MB8\ \text{MB}. Its original-to-compressed ratio is 10/8=1.25:110/8=1.25:1. The saving is 10−8=2 MB10-8=2\ \text{MB}, so the percentage saved is (2/10)×100%=20%(2/10)\times100\%=20\%. The compressed file retains 80%80\% of the original size; that is different from the percentage saved.



If the transmission rate is fixed, a smaller file takes less time to transmit. However, compression itself takes time, so shorter transmission time does not guarantee a shorter overall wait.

What to remember

  • Lossless compression permits exact reconstruction; lossy compression permits approximation.
  • Choose according to the information that must survive.
  • State the order of a size ratio and use matching units.
  • Divide the size reduction by the original size to find percentage saved.

Example: Sending a School Records Archive

A school office must send a 24 MB24\ \text{MB} folder of records to its backup server. Every original file must be recoverable exactly. A lossless option produces a 15 MB15\ \text{MB} archive; a lossy option produces a 9 MB9\ \text{MB} archive. The connection transfers files at a constant 3 MB/s3\ \text{MB/s}. Ignore transmission overhead and consider transmission time only, excluding compression and decoding time.


a) Which compression option satisfies the records requirement?


Lossless compression permits exact reconstruction of the original data. Lossy compression permits information to be discarded and therefore does not guarantee exact reconstruction.


Because every original file must be recoverable exactly, select the lossless option producing the 15 MB archive. Its larger size does not make it less suitable for this requirement.


b) For the selected option, calculate the percentage storage saved and the original-to-compressed size ratio.


First subtract the compressed size from the original size. The size saved is ________.


So−Sc=24−15=9 MBS_o-S_c=24-15=9\ \text{MB}


Next divide the saving by the original size. The saved fraction is ________.


So−ScSo=924=0.375\frac{S_o-S_c}{S_o}=\frac{9}{24}=0.375


Convert that fraction to a percentage, and separately divide the original size by the compressed size to obtain the ratio.


percentage saved=0.375×100%=37.5%\text{percentage saved}=0.375\times100\%=37.5\%


R=2415=1.6R=\frac{24}{15}=1.6


The selected archive saves 37.5% of the original storage and has an original-to-compressed ratio of 1.6:1. These describe the same reduction in different ways.


c) How long does the selected archive take to transmit, and how much transmission time does it save compared with sending the original folder?


At a constant transmission rate, divide file size by rate. The uncompressed folder would take ________ to transmit.


to=24 MB3 MB/s=8 st_o=\frac{24\ \text{MB}}{3\ \text{MB/s}}=8\ \text{s}


Apply the same calculation to the selected archive.


tc=15 MB3 MB/s=5 st_c=\frac{15\ \text{MB}}{3\ \text{MB/s}}=5\ \text{s}


Subtract the compressed transmission time from the original transmission time.


Δt=8−5=3 s\Delta t=8-5=3\ \text{s}


The archive takes 5 s to transmit and saves 3 s of transmission time. This comparison excludes the time needed to create and decode the archive, as specified in the problem.

A school must archive a spreadsheet so that every original formula, value, and file detail can be recovered exactly. Which compression decision best meets this requirement?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

A school encrypts confidential files before storing them on a shared server. Match each term to its role in this protection system.

Match each term
A.

A parameter used with an algorithm to control its transformation

B.

The operation that recovers the original readable data using the appropriate secret information

C.

The original readable data supplied to the protection process

D.

The transformed data produced by the protection process

Decryption

Cryptographic key

Plaintext

Ciphertext

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

A student compresses an 18 MB18\ \text{MB} project folder into a 6.3 MB6.3\ \text{MB} archive. What percentage of the original storage size is saved? Enter your answer as a percentage, to one decimal place.

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Extra Practice