Debian Codegraph @

doc/bgcode.md

raw symbols SCIP
1 # bgcode
2
3 bgcode is a command line application which allows to convert gcode files from ascii to binary format and viceversa.
4
5 ## Usage
6
7 ### Binary to ascii
8
9 To convert a gcode file from binary to ascii format, run:
10 ```
11 bgcode my_gcode.bgcode
12 ```
13 A new file my_gcode.gcode will be produced.
14
15 ### Ascii to binary
16
17 Conversion of a gcode file from ascii to binary format, requires the specification of the parameters to use during the binarization process.
18 These parameters are:
19
20 #### checksum
21
22 The algorithm to use for checksum.
23 Possible values:
24 * 0 - No checksum applied
25 * 1 - CRC32 algorithm
26
27 Default value: `1`
28
29 #### file_metadata_compression
30
31 The compression algorithm to apply to file metadata block.
32 Possible values:
33 * 0 - No compression
34 * 1 - Deflate algorithm
35 * 2 - Heatshrink algorithm with window size 11 and lookahead size 4
36 * 3 - Heatshrink algorithm with window size 12 and lookahead size 4
37
38 Default value: `0`
39
40 #### print_metadata_compression
41
42 The compression algorithm to apply to print metadata block.
43 Possible values:
44 * 0 - No compression
45 * 1 - Deflate algorithm
46 * 2 - Heatshrink algorithm with window size 11 and lookahead size 4
47 * 3 - Heatshrink algorithm with window size 12 and lookahead size 4
48
49 Default value: `0`
50
51 #### printer_metadata_compression
52
53 The compression algorithm to apply to printer metadata block.
54 Possible values:
55 * 0 - No compression
56 * 1 - Deflate algorithm
57 * 2 - Heatshrink algorithm with window size 11 and lookahead size 4
58 * 3 - Heatshrink algorithm with window size 12 and lookahead size 4
59
60 Default value: `0`
61
62 #### slicer_metadata_compression
63
64 The compression algorithm to apply to slicer metadata block.
65 Possible values:
66 * 0 - No compression
67 * 1 - Deflate algorithm
68 * 2 - Heatshrink algorithm with window size 11 and lookahead size 4
69 * 3 - Heatshrink algorithm with window size 12 and lookahead size 4
70
71 Default value: `0`
72
73 #### gcode_compression
74
75 The compression algorithm to apply to gcode blocks.
76 Possible values:
77 * 0 - No compression
78 * 1 - Deflate algorithm
79 * 2 - Heatshrink algorithm with window size 11 and lookahead size 4
80 * 3 - Heatshrink algorithm with window size 12 and lookahead size 4
81
82 Default value: `0`
83
84 #### gcode_encoding
85
86 The encoding algorithm to apply to gcode blocks.
87 Possible values:
88 * 0 - No encoding
89 * 1 - MeatPack algorithm
90 * 2 - MeatPack algorithm modified to keep comment lines
91
92 Default value: `0`
93
94 #### metadata_encoding
95
96 The encoding algorithm to apply to metadata.
97 Possible values:
98 * 0 - INI algorithm
99
100 Default value: `0`
101
102 ### Example
103
104 For example to convert a gcode file from ascii to binary format, with the following settins:
105
106 ```
107 gcode_encoding = MeatPack algorithm modified to keep comment lines
108 gcode_compression = Heatshrink algorithm with window size 12 and lookahead size 4
109 slicer_metadata_compression = Deflate algorithm
110 ```
111
112 run:
113 ```
114 bgcode my_gcode.gcode --slicer_metadata_compression=1 --gcode_compression=3 --gcode_encoding=2
115 ```
116
117 To convert the same file, using default settings, run:
118 ```
119 bgcode my_gcode.gcode
120 ```
121
122 In both cases, a new file my_gcode.bgcode will be produced.