123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
-
- shellarguments % push command line arguments to stack
-
- /tmpstr 65535 string def % define temp buffer
-
-
- /outstreamRaw % define raw output stream / file with filters (new file)
- 2 index (w) file
- def
-
- /outstreamRawAppend % define raw output stream / file with filters (append)
- 2 index (a) file
- def
-
- /instream % define inputstream / file
- 3 index (r) file
- def
-
- /decodeFilters % decode filters
- 4 index
- def
-
- /outstreamEncode % define output stream / file with filters
- 2 index (a) file
- 6 index cvx exec
- def
-
-
- /compress
- {
-
- (%!\ncurrentfile) outstreamRaw exch writestring % header, no filers for header
- decodeFilters outstreamRaw exch writestring % header
- ( cvx exec\n) outstreamRaw exch writestring % header
- outstreamRaw closefile
-
- {
- instream
- tmpstr readstring not
- {
- outstreamEncode exch writestring
- exit
- } if
- outstreamEncode exch writestring
- } loop
-
- outstreamEncode closefile
- instream closefile
- flush
-
- (~>) outstreamRawAppend exch writestring % End
- outstreamRawAppend closefile
-
- } bind def
-
- compress
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
|