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}s-lock.par never removed
56 ARCHIVE-%{ocean}s-main.par updated by rename
57 ARCHIVE-%{ocean}s-auxil.par appended/renamed, len in main
58 ARCHIVE-%{ocean}s-log-%{isleid}s.par appended/renamed, len in main
59 ARCHIVE-%{ocean}s-old-%{isleid}s-%4d.par.gz created, count in main
61 others files is always updated before main
62 so lockfree readers should open main, then other files
64 format is a series of lines
66 all !yarrg-archive [...] magic, 1st line
68 main !stalls <stallslenbytes> [...]
69 main !island <islandid> <islandloglenbytes> <islandoldfiles> \
71 main <commodid>= <commodname>
73 auxil <stallid>=:<stallname>
74 auxil <metadataid>=&<metadatalenbytes>\n<metadata>
76 log/old <metadataid>&<timestamp> applies to following data
77 log/old [<stallid>:]<commodid> delete offer
78 log/old [<stallid>:]<commodid>@<newprice> adjust price
79 log/old [<stallid>:]<commodid>[@<newprice>]-<qtyreduced> adjust qty
80 log/old [<stallid>:]<commodid>[@<newprice>]+<qtyincreased> maybe price
81 log ^<uploadlenbytes-padded-to-4-base62-digits>
82 applies to previous data
83 includes 6-byte len of one ^... line
85 log file is a series of diffs most recent last; each diff is
86 metadataid×tamp, zero or more commods, ^uploadlenbytes
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