Binary G-code is a new standard for encoding and compressing ASCII G-code files. G-code files are easy to read and interpret, but their downside is that the data is not saved efficiently, and the file size is often large. Compression of the file is problematic because the printers usually run on limited hardware and may not have enough memory and/or CPU power to decompress it.
The binary G-code format is flexible and the encoding and compression of individual blocks is variable. We also provide libbgcode library which contains the routines to convert ASCII G-codes to binary and vice versa. The library is written in C++ and the repository includes bindings for Python.
Our testing shows that using binary G-code reduces the average size by about 70%.
The support for the .bgcode file format is implemented in PrusaSlicer, including its export, loading configs, and previewing G-code or file associations. Exporting binary G-code can be enabled in the Printers tab in General -> Support binary G-code. This option is enabled by default starting from the PrusaSlicer version 2.7.0. An option to convert ASCII G-code to binary (or the opposite) can be found at File -> Convert.
You can disable the use of binary G-code even globally for all profiles in the Configuration - > Preferences -> Other -> Use binary G-code when the printer supports it.
To print a binary G-code, it has to be supported by the firmware of the printer. For Original Prusa MINI, MK4, and XL printers, it is supported starting from firmware 5.1.0. It is necessary to update the printer firmware before using the binary G-code format.
Some external printer control programs like Octoprint might have an issue with the binary G-code. In this case, disable the binary G-code feature in PrusaSlicer.
If you have a question about something that isn't covered here, check out our additional resources.
And if that doesn't do the trick, you can send an inquiry to [email protected] or through the button below.