ccconfig
Binary Data Conversion using C Types
Install
- All systems
-
curl cmd.cat/ccconfig.sh
- Debian
-
apt-get install libconvert-binary-c-perl
- Ubuntu
-
apt-get install libconvert-binary-c-perl
- Kali Linux
-
apt-get install libconvert-binary-c-perl
- Fedora
-
dnf install perl-Convert-Binary-C
- Windows (WSL2)
-
sudo apt-get update
sudo apt-get install libconvert-binary-c-perl
- Raspbian
-
apt-get install libconvert-binary-c-perl
- Dockerfile
- dockerfile.run/ccconfig
libconvert-binary-c-perl
Binary Data Conversion using C Types
Convert::Binary::C is a preprocessor and parser for C type definitions. It is highly configurable and supports arbitrarily complex data structures. Its object-oriented interface has pack and unpack methods that act as replacements for Perl's pack and unpack and allow one to use C types instead of a string representation of the data structure for conversion of binary data from and to Perl's complex data structures. Actually, what Convert::Binary::C does is not very different from what a C compiler does, just that it doesn't compile the source code into an object file or executable, but only parses the code and allows Perl to use the enumerations, structs, unions and typedefs that have been defined within your C source for binary data conversion, similar to Perl's pack and unpack.