Making the file smaller
The same document written twice, plainly and packed, with what each one weighs and what the packing saved.
JSON
write_object_streams.json
95 lines
This one is not a program. It is the request the document server is sent: the same page, asked for over the network by an application that writes no PDF code at all.
This request writes out the three weights the library counts for itself: what the plain file weighs, what the packed one weighs, and the difference between them. The library reads them off the two files it has just written, so they follow whatever goes into a document; here they are typed in, and would have to be typed in again.