/
usr
/
share
/
ghostscript
/
8.70
/
lib
/
/usr/share/ghostscript/8.70/lib
mkdir
upload
Name
Size
Mode
Actions
acctest.ps
4324
0644
edit
dl
rm
addxchar.ps
9848
0644
edit
dl
rm
align.ps
2313
0644
edit
dl
rm
bdftops.ps
23403
0644
edit
dl
rm
bj8.rpd
639
0644
edit
dl
rm
bj8gc12f.upp
1528
0644
edit
dl
rm
bj8hg12f.upp
1527
0644
edit
dl
rm
bj8oh06n.upp
1513
0644
edit
dl
rm
bj8pa06n.upp
1521
0644
edit
dl
rm
bj8pp12f.upp
1538
0644
edit
dl
rm
bj8ts06n.upp
1526
0644
edit
dl
rm
bjc610a0.upp
1523
0644
edit
dl
rm
bjc610a1.upp
1512
0644
edit
dl
rm
bjc610a2.upp
1513
0644
edit
dl
rm
bjc610a3.upp
1518
0644
edit
dl
rm
bjc610a4.upp
1526
0644
edit
dl
rm
bjc610a5.upp
1513
0644
edit
dl
rm
bjc610a6.upp
1513
0644
edit
dl
rm
bjc610a7.upp
1516
0644
edit
dl
rm
bjc610a8.upp
1522
0644
edit
dl
rm
bjc610b1.upp
1512
0644
edit
dl
rm
bjc610b2.upp
1513
0644
edit
dl
rm
bjc610b3.upp
1518
0644
edit
dl
rm
bjc610b4.upp
1526
0644
edit
dl
rm
bjc610b6.upp
1513
0644
edit
dl
rm
bjc610b7.upp
1517
0644
edit
dl
rm
bjc610b8.upp
1522
0644
edit
dl
rm
bjc6000a1.upp
1660
0644
edit
dl
rm
bjc6000b1.upp
1660
0644
edit
dl
rm
caption.ps
1721
0644
edit
dl
rm
cbjc600.ppd
11040
0644
edit
dl
rm
cbjc800.ppd
11383
0644
edit
dl
rm
cdj550.upp
1686
0644
edit
dl
rm
cdj690.upp
1995
0644
edit
dl
rm
cdj690ec.upp
2056
0644
edit
dl
rm
cid2code.ps
4475
0644
edit
dl
rm
decrypt.ps
350
0644
edit
dl
rm
dmp_init.ps
7246
0644
edit
dl
rm
dmp_site.ps
459
0644
edit
dl
rm
dnj750c.upp
2804
0644
edit
dl
rm
dnj750m.upp
1971
0644
edit
dl
rm
docie.ps
7373
0644
edit
dl
rm
dumphint.ps
20044
0644
edit
dl
rm
escp_24.src
350
0644
edit
dl
rm
font2c.ps
19591
0644
edit
dl
rm
font2pcl.ps
17568
0644
edit
dl
rm
ghostpdf.ppd
25643
0644
edit
dl
rm
gslp.ps
19643
0644
edit
dl
rm
gsnup.ps
2725
0644
edit
dl
rm
gs_ce_e.ps
2364
0644
edit
dl
rm
gs_cmdl.ps
4844
0644
edit
dl
rm
gs_fform.ps
3162
0644
edit
dl
rm
gs_il2_e.ps
2777
0644
edit
dl
rm
gs_kanji.ps
3942
0644
edit
dl
rm
gs_ksb_e.ps
3291
0644
edit
dl
rm
gs_l.xbm
1945
0644
edit
dl
rm
gs_l.xpm
2751
0644
edit
dl
rm
gs_lgo_e.ps
2886
0644
edit
dl
rm
gs_lgx_e.ps
1912
0644
edit
dl
rm
gs_l_m.xbm
1955
0644
edit
dl
rm
gs_m.xbm
945
0644
edit
dl
rm
gs_m.xpm
1437
0644
edit
dl
rm
gs_m_m.xbm
955
0644
edit
dl
rm
gs_pfile.ps
4349
0644
edit
dl
rm
gs_rdlin.ps
862
0644
edit
dl
rm
gs_s.xbm
594
0644
edit
dl
rm
gs_s.xpm
957
0644
edit
dl
rm
gs_s_m.xbm
604
0644
edit
dl
rm
gs_t.xbm
345
0644
edit
dl
rm
gs_t.xpm
605
0644
edit
dl
rm
gs_t_m.xbm
355
0644
edit
dl
rm
gs_wl1_e.ps
2530
0644
edit
dl
rm
gs_wl2_e.ps
2528
0644
edit
dl
rm
gs_wl5_e.ps
2546
0644
edit
dl
rm
ht_ccsto.ps
228194
0644
edit
dl
rm
image-qa.ps
73323
0644
edit
dl
rm
impath.ps
5538
0644
edit
dl
rm
jispaper.ps
930
0644
edit
dl
rm
landscap.ps
1525
0644
edit
dl
rm
level1.ps
110
0644
edit
dl
rm
lines.ps
3868
0644
edit
dl
rm
markhint.ps
3473
0644
edit
dl
rm
markpath.ps
1890
0644
edit
dl
rm
mkcidfm.ps
7305
0644
edit
dl
rm
necp2x.upp
1041
0644
edit
dl
rm
necp2x6.upp
1065
0644
edit
dl
rm
packfile.ps
10358
0644
edit
dl
rm
pcharstr.ps
3584
0644
edit
dl
rm
pdf2dsc.ps
8377
0644
edit
dl
rm
PDFA_def.ps
1170
0644
edit
dl
rm
pdfopt.ps
36516
0644
edit
dl
rm
pdfwrite.ps
11676
0644
edit
dl
rm
PDFX_def.ps
1868
0644
edit
dl
rm
pf2afm.ps
15351
0644
edit
dl
rm
pfbtopfa.ps
1141
0644
edit
dl
rm
PM760p.upp
1160
0644
edit
dl
rm
PM760pl.upp
1124
0644
edit
dl
rm
PM820p.upp
1142
0644
edit
dl
rm
PM820pl.upp
1117
0644
edit
dl
rm
ppath.ps
1974
0644
edit
dl
rm
pphs
391
0644
edit
dl
rm
pphs.ps
6922
0644
edit
dl
rm
prfont.ps
6487
0644
edit
dl
rm
printafm.ps
3775
0644
edit
dl
rm
ps2ai.ps
22485
0644
edit
dl
rm
ps2ascii.ps
44618
0644
edit
dl
rm
ps2epsi.ps
8187
0644
edit
dl
rm
quit.ps
5
0644
edit
dl
rm
ras1.upp
211
0644
edit
dl
rm
ras3.upp
210
0644
edit
dl
rm
ras4.upp
216
0644
edit
dl
rm
ras8m.upp
205
0644
edit
dl
rm
ras24.upp
215
0644
edit
dl
rm
ras32.upp
192
0644
edit
dl
rm
rollconv.ps
11765
0644
edit
dl
rm
s400a1.upp
1454
0644
edit
dl
rm
s400b1.upp
1603
0644
edit
dl
rm
sharp.upp
1936
0644
edit
dl
rm
showchar.ps
2932
0644
edit
dl
rm
showpage.ps
9
0644
edit
dl
rm
sipixa6.upp
529
0644
edit
dl
rm
st640ih.upp
2277
0644
edit
dl
rm
st640ihg.upp
1504
0644
edit
dl
rm
st640p.upp
1910
0644
edit
dl
rm
st640pg.upp
1137
0644
edit
dl
rm
st640pl.upp
1874
0644
edit
dl
rm
st640plg.upp
1101
0644
edit
dl
rm
stc.upp
1919
0644
edit
dl
rm
stc2.upp
1900
0644
edit
dl
rm
stc2s_h.upp
2268
0644
edit
dl
rm
stc2_h.upp
1875
0644
edit
dl
rm
stc200_h.upp
1844
0644
edit
dl
rm
stc300.upp
2132
0644
edit
dl
rm
stc300bl.upp
1337
0644
edit
dl
rm
stc300bm.upp
1426
0644
edit
dl
rm
stc500p.upp
1899
0644
edit
dl
rm
stc500ph.upp
1899
0644
edit
dl
rm
stc600ih.upp
2277
0644
edit
dl
rm
stc600p.upp
1147
0644
edit
dl
rm
stc600pl.upp
1111
0644
edit
dl
rm
stc640p.upp
1091
0644
edit
dl
rm
Stc670p.upp
1159
0644
edit
dl
rm
Stc670pl.upp
1124
0644
edit
dl
rm
Stc680p.upp
1140
0644
edit
dl
rm
Stc680pl.upp
1115
0644
edit
dl
rm
stc740ih.upp
2123
0644
edit
dl
rm
Stc740p.upp
1039
0644
edit
dl
rm
Stc740pl.upp
1115
0644
edit
dl
rm
Stc760p.upp
1141
0644
edit
dl
rm
Stc760pl.upp
1115
0644
edit
dl
rm
Stc777p.upp
1140
0644
edit
dl
rm
Stc777pl.upp
1115
0644
edit
dl
rm
stc800ih.upp
2154
0644
edit
dl
rm
stc800p.upp
1111
0644
edit
dl
rm
stc800pl.upp
1093
0644
edit
dl
rm
stc1520h.upp
2150
0644
edit
dl
rm
stcany.upp
669
0644
edit
dl
rm
stcany_h.upp
677
0644
edit
dl
rm
stcinfo.ps
25733
0644
edit
dl
rm
stcolor.ps
5221
0644
edit
dl
rm
stc_h.upp
1909
0644
edit
dl
rm
stc_l.upp
730
0644
edit
dl
rm
stocht.ps
2646
0644
edit
dl
rm
Stp720p.upp
1158
0644
edit
dl
rm
Stp720pl.upp
1115
0644
edit
dl
rm
Stp870p.upp
1140
0644
edit
dl
rm
Stp870pl.upp
1115
0644
edit
dl
rm
traceimg.ps
1528
0644
edit
dl
rm
traceop.ps
2734
0644
edit
dl
rm
type1enc.ps
2536
0644
edit
dl
rm
type1ops.ps
7576
0644
edit
dl
rm
uninfo.ps
6136
0644
edit
dl
rm
unprot.ps
1904
0644
edit
dl
rm
viewcmyk.ps
2113
0644
edit
dl
rm
viewgif.ps
4573
0644
edit
dl
rm
viewjpeg.ps
4949
0644
edit
dl
rm
viewmiff.ps
3778
0644
edit
dl
rm
viewpbm.ps
5307
0644
edit
dl
rm
viewpcx.ps
4345
0644
edit
dl
rm
viewps2a.ps
1282
0644
edit
dl
rm
wftopfa.ps
8923
0644
edit
dl
rm
winmaps.ps
3743
0644
edit
dl
rm
wrfont.ps
18168
0644
edit
dl
rm
zeroline.ps
2463
0644
edit
dl
rm
Edit:
/usr/share/ghostscript/8.70/lib/packfile.ps
(10358B)
% 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 $ % packfile.ps % Pack groups of files together, with compression, for use in % storage-scarce environments. % ****** NOTE: This file must be kept consistent with gs_pfile.ps. % ---------------- Huffman coding utilities ---------------- % % We count runs of zeros, and individual byte frequencies separately % depending on whether they follow or do not follow a run of zeros. /zruns 256 array def /zfreq 256 array def /nzfreq 256 array def /maxcode 13 def % max code length, must be between 10 and 16 /maxzrun 100 def % max length of zero run, must be <= 100 /statbuf 10000 string def % Initialize statistics. /initstats % - initstats - { 0 1 255 { zruns exch 0 put } for 0 1 255 { zfreq exch 0 put } for 0 1 255 { nzfreq exch 0 put } for } bind def % Accumulate statistics from an individual file. /addstats % <file> addstats - { 0 { 1 index //statbuf readstring 3 1 roll % 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 } forall exch not { exit } if (.) print flush } loop pop closefile } bind def % Compute the Huffman codes from the statistics. /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 dup 0 1 255 { zfreq 1 index get nzfreq 2 index get add put dup } for 0 zruns 1 get put 256 zruns 2 maxzrun 2 sub getinterval putinterval dup dup length 1 sub 1 put % EOD maxcode .computecodes } bind def % ---------------- File handling ---------------- % % Copy one file to another. % Close the input file, but not the output file. /copyfile % <infile> <outfile> copyfile <outfile> <length> { 0 mark statbuf { 4 index 1 index readstring exch 5 index 1 index writestring length 5 -1 roll add 4 1 roll not { exit } if (.) print flush } loop cleartomark 3 -1 roll closefile dup == flush } bind def % Represent a Type 1 font in its most compressed format. % Requires -dWRITESYSTEMDICT to run. % Does not close the output file. (wrfont.ps) runlibfile /compressfont % <fontname> <outfile> compressfont <outfile> { exch save systemdict /executeonly /readonly load put systemdict /noaccess /readonly load put systemdict readonly pop wrfont_dict begin /binary_CharStrings true def /binary_tokens true def /encrypt_CharStrings false def /standard_only false def /use_lenIV 0 def /smallest_output true def end exch findfont setfont 1 index writefont restore } bind def % ---------------- Main program ---------------- % % Find the length of a file. /filelength % <filename> filelength <length> { status { pop pop exch pop } { -1 } ifelse } bind def % Define the header string for a compressed file. /beginfilestring ({dup token pop exch[/MaxCodeLength 2 index token pop/Tables 4 index token pop /EndOfData true/EncodeZeroRuns 256 .dicttomark /BoundedHuffmanDecode filter/MoveToFrontDecode filter [/BlockSize 4 -1 roll .dicttomark/BWBlockSortDecode filter }) readonly def % Write a 16-bit big-endian non-negative integer on a file. /write16 % <file> <int> write16 - { 2 copy -8 bitshift write 255 and write } bind def % Compress a group of files together. % Return a dictionary in which the keys are the input file names % and the values are [startpos length] in the uncompressed concatenation. % Does not open or close the output file. /tempname (t.em) def /packfiles % <filenames> <outfile> packfiles <outfile> <posdict> { % Concatenate files to a temporary file. tempname (w) file dup /MoveToFrontEncode filter dup << /BlockSize 1000000 >> /BWBlockSortEncode filter % 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 dup 7 index 4 2 roll 7 index exch 2 array astore put 5 -1 roll add 4 1 roll } forall closefile closefile closefile pop exch % 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. dup tempname filelength write== dup maxcode write== % 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 >> /BoundedHuffmanEncode filter tempname (r) file exch copyfile pop closefile exch } bind def % Squeeze a font to a .cpf file in anticipation of compression. /squeezefont % <fontname> squeezefont <filename.cpf> { dup type /nametype ne { cvn } if dup { dup type /stringtype eq { exit } if Fontmap exch get } loop % Stack: fontname filename dup dup { (.) search not { exit } if exch pop exch 3 -1 roll pop } loop % 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 (.cpf) concatstrings dup 5 1 roll (w) file % Stack: outfilename fontname filename extension outfile exch dup (pfa) eq exch (pfb) eq or % Stack: outfilename fontname filename outfile bool { exch pop compressfont } { 3 -1 roll pop exch findlibfile pop exch pop exch copyfile pop } ifelse closefile } bind def % ---------------- Production code ---------------- % % The following code constructs a packed version of the commercial-quality % fonts available from Aladdin Enterprises. To use this code: % - If desired, change the output file names below. % - Make sure you have the synthetic font data (fontmap.shs and the % *.ps files for the commercial fonts) in a directory that is on % Ghostscript's search path. % - Construct the packed fonts by running % gs -dNODISPLAY -dWRITESYSTEMDICT packfile.ps % - If desired, move the output files to the directory that will be % used at run time. You no longer need the *.pfb or *.ps files % for the original fonts; however, you do still need the Fontmap % for these fonts, because it defines the font name aliases. % - Add the following line to the end of gs_fonts.ps: % (ALL.cmp) run % (substituting the definition of allmapname if you changed it). % Define the output file names. The extensions are arbitrary; % any legal file name is allowed. /allname (ALL.cff) def % the compressed font file /allmapname (ALL.cmp) def % the Fontmap override file % Load an alternate Fontmap that references the synthetic oblique and % narrow fonts. true .setglobal (fontmap.shs) findlibfile pop exch pop .loadFontmap false .setglobal % Define the packaging of fonts into font groups. % Fewer larger groups compress better, but make decompression slower. /Lists [ [ % The oblique and narrow fonts are synthetic, % and take very little space. /AvantGarde-BookOblique /AvantGarde-DemiOblique /Courier-Oblique /Courier-BoldOblique /Helvetica-Oblique /Helvetica-BoldOblique /Helvetica-Narrow /Helvetica-Narrow-Oblique /Helvetica-Narrow-Bold /Helvetica-Narrow-BoldOblique ] [/AvantGarde-Book /AvantGarde-Demi /Bookman-Light] [/Bookman-LightItalic /Bookman-Demi /Bookman-DemiItalic /Courier] [/Courier-Bold /Helvetica /Helvetica-Bold] [/NewCenturySchlbk-Roman /NewCenturySchlbk-Italic /NewCenturySchlbk-Bold /NewCenturySchlbk-BoldItalic] [/Palatino-Roman /Palatino-Italic /Palatino-Bold /Palatino-BoldItalic] [/Times-Roman /Times-Italic /Times-Bold /Times-BoldItalic] [/Symbol /ZapfChancery-MediumItalic /ZapfDingbats] ] def % We need to register the fonts under their true names, not aliases. /Lists Lists mark exch { mark exch { { Fontmap 1 index get dup type /nametype ne { pop exit } if exch pop } loop } forall ] } forall ] def % Squeeze the fonts to their .cpf format. (Squeezing... ) print flush /fdict mark Lists { { dup squeezefont } forall } forall .dicttomark def (done.\n) print flush % Invert fdict. /f2dict fdict length dict def fdict { exch f2dict 3 1 roll put } forall % Construct the compressed font file. (Creating ) print allname print (... ) print flush /posdict fdict length dict def /all allname (w) file def all beginfilestring writestring Lists { dup == flush /fbegin all fileposition def mark exch { fdict exch get } forall ] all packfiles exch pop /flength all fileposition fbegin sub def { fbegin flength 3 -1 roll aload pop 4 packedarray exch f2dict exch get exch posdict 3 1 roll put } forall } forall all closefile (done.\n) print flush % Write the Fontmap addendum for accessing compressed fonts. (Writing ) print allmapname print (... ) print flush allmapname (w) file dup (%! /.runpackedlibfile where{pop}{(gs_pfile.ps)runlibfile}ifelse .currentglobal true .setglobal ) writestring posdict { exch 2 index exch write==only exch dup ({) writestring dup allname write==only exch { 1 index dup ( ) writestring exch write==only } forall dup ( .runpackedlibfile}bind .definefontmap ) writestring } forall dup (.setglobal ) writestring closefile (done.\n) print flush
Save
cmd:
run