1 m.{153,155} Admiral, 3580s
3 using only cols 2,3 (buy)
5 changes in price,qty by island, commod, stall
7 changes in total qty by island, commod, price
10 stall "Couchablanca" adds lots of offers (100ish), lots else
12 ----------------------------------------
14 m.{151,153} Admiral, 38s
16 using only cols 2,3 (buy)
18 changes in price,qty by island, commod, stall
21 two stocks changed at one stall
24 m.{149,151} Admiral, 84s
28 ----------------------------------------
30 m.{020,145} Turtle, 271944s
33 391 / 1056 53 stall changes, 128 commod changes, if sorted
37 ----------------------------------------
39 m.{117,145} Turtle, 47797s
47 ========================================
49 very few price changes, mostly qty changes
55 ARCHIVE.%{ocean}.lock.par never removed
56 ARCHIVE.%{ocean}.ocean.par updated by rename
57 ARCHIVE.%{ocean}s.%{isle}s.main.par updated by rename
58 ARCHIVE.%{ocean}s.%{isle}s.log.par appended, length in main
59 ARCHIVE.%{ocean}s.%{isle}s.z%d.par create/write, length in main
60 ocean file is always updated first so lockfree readers should open
63 integers are in LE byte order
64 vuint is one or more bytes with 7 bits each, BE first; top bit is "more bytes"
66 format for an ocean file
67 magic Frame uint8*4 59a72671
70 starting with commodity 0x0001 as zero is reserved for sentinels
71 commodity name uint16 name length
72 uint8*length name bytes
74 format for a main file
75 magic Frame uint8*4 59a72672
76 number of z files Frame uint32
77 length of log file in bytes Frame uint32
79 single uncompressed diff
80 representing the change from nothing to
81 the most recent uploaded data
83 format for a log or z file
85 magic Frame uint8*4 59a72673
87 series of diffs most recent last
89 for a log file, there may be some trailing garbage
90 not referred to in main file (see "length of log file")
92 for a z file, the file length is definitive and the last
93 entry is always valid if the file is referred to in the main
94 file, but any z file not mentioned in the main file is
98 Each diff records a change "going backwards", ie you apply the
99 diff to a more recent state to get an earlier state; the metadata
100 corresponds to the earlier state; diffs at the physical end, ie
101 logical start, of the file, contain information without previous
102 context (ie start from empty, no offers)
104 diff format version Plain uint8 constant 0x01
107 (amount by which this timestamp
108 is later than the previous upload in this file,
109 or later than 0 if there is no previous pload in this file)
112 for each payload stream, ie:
113 for Meta, Stall, Commod, Price, Qty:
114 in an uncompressed diff:
115 uncompressed data Plain some number of bytes
116 the uncompressed data is in the order shown below
117 in a compressed diff:
118 compressed length Plain vuint
119 compressed data Plain that number of bytes
120 the compressed data for each stream forms a continuous
121 compression stream within each file, starting with
122 the last diff in the file and then running backwards
124 diff length (reverse pointer) Frame uint32
125 includes length of exactly the
126 data sections marked "Plain"
128 format inside the payload streams
129 uncompressed streams, literally in this order
130 compressed streams: read each substream in order, but ordering
131 between substreams with a diff is semantic but not physical
134 ocean, island, timestamp Meta uint16 metadata length
135 Meta uint8*length metadata
139 stall name Stall uint16 name length
140 Stall uint8*length name
142 for each commod which has changed price
143 including ones which have been added
145 commodid Commod uint16 commodity id
147 buy price delta Price uint16
148 sell price delta Price uint16
149 in case of added offers, previous price
150 is taken to be best price from previous upload
151 at this island, or 0 if previously no offers
153 sentinel commodid Commod uint16 constant 0x0000
155 for each commod which has changed qty
156 including ones which have been added or removed
158 commodid Commod uint16 commodity id
159 buy qty delta Qty uint16
160 sell qty delta Qty uint16
162 sentinel commodid Commod uint16 constant 0x0000
164 sentinel stall name Stall uint16 constant 0x0000