bin2obj(1)
π bin2obj β the Free Pascal binary-to-pascal include file converter π
okay so bestie, welcome to bin2obj(1) β yes, that's section 1 of the manual, and yes, this is the Free Pascal binary to pascal include file converter. it's giving "I turn your mysterious little blob of bytes into actual Pascal code" and honestly? iconic. π¦
β¨ SYNOPSIS β¨
bin2obj [-aeouUz] -c constname infile
that's it. that's the whole vibe check. infile goes in, Pascal constant comes out. π
πΈ DESCRIPTION πΈ
okay so here's the tea: bin2obj reads a binary file and converts it to a pascal typed constant declaration. periodt.
the constant it makes is an array of bytes (zero based, no cap), and each byte in that array has the value of the byte at the offset index in the file. and like, to be clear β index is the index in the array. iykyk. π
π«Ά USAGE π«Ά
so bin2obj accepts a filename of a binary file, and it needs the name of a constant (use the -c option for that one, bestie, don't forget).
the output goes to standard output by default. and if no unitname is given, the output will be in the form of code which can be written to an include file. cute, right? β¨
π OPTIONS π
bin2obj has a small number of options to control its behaviour. small but mighty, fr fr:
-aβ write ASCII data instead of bytes. the constant array will be an array of char instead of an array of bytes, and the bytes will be written as ASCII constants. glow-up moment. π-ekey β if this option is given, the data will be encrypted with key, which is a string of 8 characters long. yes, exactly 8. count them. π-hβ emit a small helptext. tiny. adorable. helpful. π-ofilename β by default, the output goes to standard output (the screen, bestie). if this option is given,bin2objwill write the output to a file with name filename instead.
β οΈ heads up: this option is mandatory if the-Uoption is specified. no-o, no-U. rules are rules. π
-u[unitname] β this option tellsbin2objto generate a unit. by default the output is just the declaration of the constant. if the unitname is not specified,bin2objtries to determine it from the input filename. main character energy, figuring it out on its own. β¨-U[unitname] β the same as the-uoption, onlybin2objwill also call the compiler and compile the unit. it's not just making the unit, it's making it happen. π₯-zβ compress the data before creating the unit. zlib compression is used. squeeze it, bestie. π
π SEE ALSO π
go read those too, bestie, they're part of the friend group. π«Ά
and that's the whole page!! this little legend is brought to you by Free Pascal, dated 12 November 2004, and it lives at bin2obj(1) in section 1 of the manual. mwah. πβ¨
π¦ where this page comes from
- arch rolling: fpc 3.2.2-11 Β· GPL AND LGPL AND custom
- epel 10: fpc 3.2.2-20.el10_1 Β· GPL-2.0-or-later AND LGPL-2.1-or-later WITH Independent-modules-exception
- epel 9: fpc 3.2.2-10.el9 Β· GPLv2+ and LGPLv2+ with exceptions
- fedora 43: fpc 3.2.2-20.fc43 Β· GPL-2.0-or-later AND LGPL-2.1-or-later WITH Independent-modules-exception
- fedora 43: fpc 3.2.2-20.fc43 Β· GPL-2.0-or-later AND LGPL-2.1-or-later WITH Independent-modules-exception
- fedora 44: fpc 3.2.4~rc1-3.fc44 Β· GPL-2.0-or-later AND LGPL-2.1-or-later WITH Independent-modules-exception
- fedora 44: fpc 3.2.4~rc1-3.fc44 Β· GPL-2.0-or-later AND LGPL-2.1-or-later WITH Independent-modules-exception
- nixos 26.05: fpc 3.2.2
- nixos 26.05: lazarus-gtk2 4.4-0
- nixos 26.05: lazarus-qt5 4.4-0
- nixos 26.05: lazarus-qt6 4.4-0
- nixpkgs unstable: fpc 3.2.2
- nixpkgs unstable: lazarus-cocoa 4.8-0
- nixpkgs unstable: lazarus-gtk3 4.8-0
- nixpkgs unstable: lazarus-qt5 4.8-0
- nixpkgs unstable: lazarus-qt6 4.8-0
- opensuse-leap 16.0: fpc 3.2.2-bp160.1.35 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: fpc 3.2.2-bp160.1.35 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: fpc 3.2.2-bp160.1.35 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms