Fossil

Check-in [82ad5914]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fixed a few bugs in the Makefile in the www/image-format-vs-repo-size.md doc, and added a caveat about potential further bugs.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 82ad5914f101d867cb991a84071d3154b2155495958356ccd81b1962a90d336b
User & Date: wyoung 2019-03-24 18:56:57.839
Context
2019-03-25
06:18
Typo fix, reported in the forum: administator. ... (check-in: 1614c9b5 user: stephan tags: trunk)
2019-03-24
18:56
Fixed a few bugs in the Makefile in the www/image-format-vs-repo-size.md doc, and added a caveat about potential further bugs. ... (check-in: 82ad5914 user: wyoung tags: trunk)
18:50
Added my two recently-created documents to the permuted doc index ... (check-in: 41579b4c user: wyoung tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to www/image-format-vs-repo-size.md.
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
## Automated Recompression

Since programs that produce and consume binary-compressed data files
often make it either difficult or impossible to work with the
uncompressed form, we want an automated method for producing the
uncompressed form to make Fossil happy while still having the compressed
form to keep our content creation applications happy.  This `Makefile`
will do that for several different compressed file types:

        .SUFFIXES: .bmp .png .svg .svgz

        .svgz.svg:
            gzip -dc < $< > $@

        .svg.svgz:







|







157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
## Automated Recompression

Since programs that produce and consume binary-compressed data files
often make it either difficult or impossible to work with the
uncompressed form, we want an automated method for producing the
uncompressed form to make Fossil happy while still having the compressed
form to keep our content creation applications happy.  This `Makefile`
should⁴ do that for BMP, PNG, SVG, and XLSX files:

        .SUFFIXES: .bmp .png .svg .svgz

        .svgz.svg:
            gzip -dc < $< > $@

        .svg.svgz:
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194

        SS_FILES := $(wildcard spreadsheet/*)


        all: $(SS_FILES) illus.svg image.bmp doc-big.pdf

        reconstitute: illus.svgz image.png
            unzip spreadsheet.xlsx -d spreadsheet
            qpdf doc-small.pdf doc-big.pdf


        $(SS_FILES): spreadsheet.xlsx
            unzip $@ -d $<

        doc-big.pdf: doc-small.pdf
            qpdf --stream-data=uncompress $@ $<







|
|







179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194

        SS_FILES := $(wildcard spreadsheet/*)


        all: $(SS_FILES) illus.svg image.bmp doc-big.pdf

        reconstitute: illus.svgz image.png
            ( cd spreadsheet ; zip -9 ../spreadsheet.xlsx) * )
            qpdf doc-big.pdf doc-small.pdf


        $(SS_FILES): spreadsheet.xlsx
            unzip $@ -d $<

        doc-big.pdf: doc-small.pdf
            qpdf --stream-data=uncompress $@ $<
255
256
257
258
259
260
261




262
263
264
265
3.  The raw data changes somewhat from one run to the next due to the
    use of random noise in the image to make the zlib/PNG compression
    more difficult, and the random pixel changes.  Those test design
    choices make this a [Monte Carlo experient][mce].  We’ve found that
    the overall character of the results don’t change much from one run
    to the next.





[git]: https://git-scm.com/
[lzw]: https://en.wikipedia.org/wiki/Lempel%E2%80%93Ziv%E2%80%93Welch
[rs]:  https://rsync.samba.org/
[us]:  http://www.cis.upenn.edu/~bcpierce/unison/







>
>
>
>




255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
3.  The raw data changes somewhat from one run to the next due to the
    use of random noise in the image to make the zlib/PNG compression
    more difficult, and the random pixel changes.  Those test design
    choices make this a [Monte Carlo experient][mce].  We’ve found that
    the overall character of the results don’t change much from one run
    to the next.

4.  The `Makefile` above is not battle-tested.  Please report bugs and
    needed extensions [on the forum][for].

[for]: https://fossil-scm.org/forum/forumpost/15e677f2c8
[git]: https://git-scm.com/
[lzw]: https://en.wikipedia.org/wiki/Lempel%E2%80%93Ziv%E2%80%93Welch
[rs]:  https://rsync.samba.org/
[us]:  http://www.cis.upenn.edu/~bcpierce/unison/