@@ -15,6 +15,31 @@ These commands may take a few minutes to run with `python3`,
1515depending on the amount of data involved and your machine specs.
1616Consider using ` pypy3 ` for a faster run time.
1717
18+ ### Encoding and Decoding
19+
20+ ASmap files are somewhat large in text form, and need to be encoded
21+ to binary before being used with Bitcoin Core.
22+
23+ The ` encode ` command takes an ASmap and an output file.
24+
25+ The ` --fill ` /` -f ` flag further reduces the size of the output file
26+ by assuming an AS assignment for an unmapped network if an adjacent network is assigned.
27+ This procedure is lossy, in the sense that it loses information
28+ about which ranges were unassigned.
29+ However, if the input ASmap is incomplete,
30+ this procedure will also reassign ranges that should have an AS assignment,
31+ resulting in an ASmap that may diverge from reality significantly.
32+ Finally, another consequence is that the resulting encoded file
33+ will no longer be meaningful for diffs.
34+ Therefore only use ` --fill ` if
35+ you want to optimise space, you have a reasonably complete ASmap,
36+ and do not intend to diff the file at a later time.
37+
38+ The ` decode ` command takes an encoded ASmap and an output file.
39+ As with ` encode ` , the ` --fill ` /` -f ` flag reduces the output file size
40+ by reassigning subnets. Conversely, the ` --non-overlapping ` /` -n ` flag
41+ increases output size by outputting strictly non-overlapping network ranges.
42+
1843### Comparing ASmaps
1944
2045AS control of IP networks changes frequently, therefore it can be useful to get
0 commit comments