summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlgs/lib/packfile.ps
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/tlgs/lib/packfile.ps')
-rw-r--r--Master/tlpkg/tlgs/lib/packfile.ps80
1 files changed, 40 insertions, 40 deletions
diff --git a/Master/tlpkg/tlgs/lib/packfile.ps b/Master/tlpkg/tlgs/lib/packfile.ps
index a7690448947..021de4ae504 100644
--- a/Master/tlpkg/tlgs/lib/packfile.ps
+++ b/Master/tlpkg/tlgs/lib/packfile.ps
@@ -1,19 +1,19 @@
% Copyright (C) 1994, 1995, 1996 Aladdin Enterprises. All rights reserved.
-%
+%
% This software is provided AS-IS with no warranty, either express or
% implied.
-%
+%
% This software is distributed under license and may not be copied,
% modified or distributed except as expressly authorized under the terms
% of the license contained in the file LICENSE in this distribution.
-%
+%
% For more information about licensing, please refer to
% http://www.ghostscript.com/licensing/. For information on
% commercial licensing, go to http://www.artifex.com/licensing/ or
% contact Artifex Software, Inc., 101 Lucas Valley Road #110,
% San Rafael, CA 94903, U.S.A., +1(415)492-9861.
-% $Id: packfile.ps 6300 2005-12-28 19:56:24Z giles $
+% $Id$
% packfile.ps
% Pack groups of files together, with compression, for use in
% storage-scarce environments.
@@ -42,21 +42,21 @@
/addstats % <file> addstats -
{ 0
{ 1 index //statbuf readstring 3 1 roll
- % Stack: file eof numzeros data
+ % Stack: file eof numzeros data
{ dup 0 eq
- { pop 1 add
- }
- { 1 index 0 ne
- { exch 255 .min
- //zruns exch 2 copy get 1 add put
- 0 exch //zfreq
- }
- { //nzfreq
- }
- ifelse
- exch 2 copy get 1 add put
- }
- ifelse
+ { pop 1 add
+ }
+ { 1 index 0 ne
+ { exch 255 .min
+ //zruns exch 2 copy get 1 add put
+ 0 exch //zfreq
+ }
+ { //nzfreq
+ }
+ ifelse
+ exch 2 copy get 1 add put
+ }
+ ifelse
} forall
exch not { exit } if (.) print flush
} loop
@@ -67,7 +67,7 @@
/statcodes % - statcodes <array>
{ maxcode 1 add 256 add maxzrun 2 sub add 1 add array % full array
dup maxcode 1 add dup 2 index length exch sub getinterval % data
- % Put statistics into array
+ % Put statistics into array
dup 0 1 255
{ zfreq 1 index get nzfreq 2 index get add put dup
} for
@@ -143,9 +143,9 @@
tempname (w) file
dup /MoveToFrontEncode filter
dup <<
- /BlockSize 1000000
+ /BlockSize 1000000
>> /BWBlockSortEncode filter
- % Stack: filenames outfile tempfile mtfe bwe
+ % Stack: filenames outfile tempfile mtfe bwe
5 -1 roll dup length dict 0 6 2 roll
{ % Stack: outfile posdict pos tempfile mtfe bwe infilename
dup ==only dup (r) file 2 index copyfile exch pop
@@ -153,23 +153,23 @@
5 -1 roll add 4 1 roll
} forall
closefile closefile closefile pop exch
- % Stack: posdict outfile
- % Compute an optimal Huffman code.
+ % Stack: posdict outfile
+ % Compute an optimal Huffman code.
initstats
tempname (r) file addstats
- % Actually compress the file.
- % Write the decompression information on the output first.
+ % Actually compress the file.
+ % Write the decompression information on the output first.
dup tempname filelength write==
dup maxcode write==
- % Write the code table as a homogenous number array.
+ % Write the code table as a homogenous number array.
statcodes exch
dup 149 write dup 32 write dup 2 index length write16
exch { 2 copy write16 pop } forall
dup <<
- /MaxCodeLength maxcode
- /EndOfData true
- /EncodeZeroRuns 256
- /Tables statcodes
+ /MaxCodeLength maxcode
+ /EndOfData true
+ /EncodeZeroRuns 256
+ /Tables statcodes
>> /BoundedHuffmanEncode filter
tempname (r) file exch copyfile pop closefile
exch
@@ -183,26 +183,26 @@
Fontmap exch get
}
loop
- % Stack: fontname filename
+ % Stack: fontname filename
dup dup
{ (.) search not { exit } if
exch pop exch 3 -1 roll pop
}
loop
- % Stack: fontname filename noextname extension
+ % Stack: fontname filename noextname extension
exch
{ (/) search not { (\\) search not { exit } if } if
pop pop
}
loop
- % If the font extension is anything other than
- % .pfa or .pfb, we assume it can't be rewritten
- % using compressfont.
- % Stack: fontname filename extension basename
+ % If the font extension is anything other than
+ % .pfa or .pfb, we assume it can't be rewritten
+ % using compressfont.
+ % Stack: fontname filename extension basename
(.cpf) concatstrings dup 5 1 roll (w) file
- % Stack: outfilename fontname filename extension outfile
+ % Stack: outfilename fontname filename extension outfile
exch dup (pfa) eq exch (pfb) eq or
- % Stack: outfilename fontname filename outfile bool
+ % Stack: outfilename fontname filename outfile bool
{ exch pop compressfont
}
{ 3 -1 roll pop
@@ -245,7 +245,7 @@ false .setglobal
% Fewer larger groups compress better, but make decompression slower.
/Lists [
[ % The oblique and narrow fonts are synthetic,
- % and take very little space.
+ % and take very little space.
/AvantGarde-BookOblique /AvantGarde-DemiOblique
/Courier-Oblique /Courier-BoldOblique
/Helvetica-Oblique /Helvetica-BoldOblique
@@ -272,7 +272,7 @@ false .setglobal
/Lists Lists mark exch
{ mark exch
{ { Fontmap 1 index get dup type /nametype ne { pop exit } if
- exch pop
+ exch pop
}
loop
}