Professional Documents
Culture Documents
%
% 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.
% Utilities
/read1 { % <file> read1 <value>
read not {
(**** Unexpected EOF) = flush quit
} if
} bind def
/read2 { % <file> read2 <value>
dup read1 8 bitshift exch read1 add
} bind def
/read4 { % <file> read4 <value>
dup read2 16 bitshift exch read2 add
} bind def
% Free variables: Bits, Bitsleft
/readninit { % - <readninit> -
/Bits 0 def
/Bitsleft 0 def
} bind def
20 dict begin
/f exch def
/npages exch def
readninit
(*1) { [ npages { f nb3 readn } repeat ] ==only } (# objs/page deltas (see 1,3))
ptag
(*2) { [ npages { f nb5 readn } repeat ] ==only } (# bytes/page deltas (see 4,5))
ptag
(*3) { [ npages { f nb10 readn } repeat ] dup ==only /nso exch def } (# of shared
obj refs (see 10)) ptag
(*4) { [ nso { [ exch { f nb11 readn } repeat ] } forall ] ==only } (shared obj
indices (see 11)) ptag
(*5) { [ nso { [ exch { f nb12 readn } repeat ] } forall ] ==only } (shared obj
ref pos numerators (see 12)) ptag
(*6) { [ npages { f nb7 readn } repeat ] ==only } (content stream offset-in-page
deltas (see 6,7)) ptag
(*7) { [ npages { f nb9 readn } repeat ] ==only } (content stream length deltas
(see 8,9)) ptag
} bind def
20 dict begin
/f exch def
readninit
/nse n4 def
(*1) { [ nse { f nb7 readn } repeat ] ==only } (shared obj group length deltas
(see 6,7)) ptag
(*2) { [ nse { f 1 readn } repeat ] dup ==only /md5s exch def } (MD5 present?)
ptag
(*3:) = md5s {
0 ne {
( ) print f 16 string readstring pop
(%stdout) (w) file dup 3 -1 roll writehexstring closefile () =
} if
} forall
(*4) { [ nse { f nb5 readn } repeat ] ==only } (# objs/group (see 5)) ptag
end % temp dict
} bind def