"I can't email this file."
Riku looked troubled. The image file was 50 MB.
"Just compress it," Aoi suggested.
"Compress? Like crushing it?" Riku tilted his head.
Yuki laughed. "It's a technique to make data smaller."
Aoi opened the notebook. "The basis of compression is removing redundancy."
"Redundancy... repetition of the same information?"
"Yes. For example, the string 'AAAAAABBBBCCCC'."
Riku looked. "A, B, and C are repeating."
"With run-length encoding, this becomes '6A4B4C'. 14 characters become 6."
Yuki got excited. "Less than half!"
"This is the basic principle of compression. Find patterns and replace with shorter expressions."
Aoi drew another example on the whiteboard.
"Dictionary coding. Represent frequent words or phrases with short codes."
"Like abbreviating 'information theory' to 'IT' instead of writing it every time?"
"Exactly. Famous compression algorithms like LZ77 and LZW use this principle."
Riku thought. "What about data without patterns?"
"Can't be compressed," Aoi said firmly. "Random data has high entropy, so there's no room for compression."
Yuki asked. "How do you compress images?"
"Several methods. First, adjacent pixels often have similar colors. Utilize this correlation."
Aoi showed an image on the smartphone. A photo of the sky.
"Blue pixels are lined up. Instead of repeating 'blue, blue, blue...', express it as '1000 blues'."
"I see."
"Furthermore, human eyes are insensitive to fine changes. Even if high-frequency components are removed, appearance doesn't change."
Riku reacted. "That's JPEG?"
"Correct. JPEG transforms to frequency domain and discards unimportant components."
Aoi supplemented. "Uses DCT, Discrete Cosine Transform. Decomposes image into frequency components and removes high frequencies."
Yuki wrote in the notebook. "Lossless compression finds patterns, lossy compression discards information."
"Good summary."
Riku had a question. "Can you compress a compressed file further?"
"Generally impossible," Aoi explained. "Redundancy is already removed. Compressed files look almost random."
"Huh, compression has limits too."
"Entropy is the limit. Can't reduce beyond that."
Yuki suddenly thought of something. "Can encrypted files also not be compressed?"
"Sharp! Good encryption looks random. So it can't be compressed."
Aoi continued. "Conversely, compressible data has patterns. Can be a security weakness."
Riku became serious. "Compression is also a technique to see through information."
"Yes. Without understanding data structure, you can't compress efficiently."
Aoi looked at Riku's file. "This image has many regions of the same color. Resaving in PNG format will make it much smaller."
"I'll try it!"
Minutes later, the file size became 10 MB.
"Amazing! One-fifth!"
"Choosing compression format matching image properties is important," Aoi said.
Yuki smiled. "Understanding data's character and choosing the optimal method. Like human relationships."
"Interesting metaphor," Aoi acknowledged. "Compression also starts from understanding the other party."
Riku sent the file. "It got through! Thanks, Aoi-senpai."
"Heavy data becomes light when understood," Aoi said quietly.
Information theory was always practical.