The Packetization Module is a versatile tool developed in C++, C#, Java, and Python for packing raw data into a structured format suitable for transmission over Ethernet or other communication channels. The module adds a customizable header and footer to the raw data, supporting multiple types of headers and footers. Additionally, it provides options for encrypting and compressing the data body, enhancing the efficiency and security of data transmission.
-
Header and Footer Support: The module allows the inclusion of headers and footers to the raw data, enabling customization based on specific requirements.
-
Encryption: Data body encryption is available for secure transmission, providing an extra layer of protection for sensitive information.
-
Compression: The module supports data compression, optimizing bandwidth usage and transmission efficiency.
-
Low Dependency: This module depend on no external library.
-
Multi-language Support: Developed in C++, C#, and Python, making it accessible and integrable into a variety of projects and platforms.
-
Data Streaming: This modul support data streaming to gadering and detect header and extreact expected data.
- C++ Compiler
- .NET Framework (for C#)
- Python (for Python)
- Java (for Java)
- Create an Instance:
- C++
CBinaryDataPacketizer *packetizer = new BinaryDataPacketizer();
- C#
BinaryDataPacketizer packetizer = new BinaryDataPacketizer();
- Python
packetizer = BinaryDataPacketizer()
- Java
BinaryDataPacketizer packetizer = new BinaryDataPacketizer();
- Initialize:
- C++
packetizer->SetSOFBuilder(/*One Header Builder*/); packetizer->AddEOFBuilder(/*One Header Builder*/); packetizer->AddPacketBuilder(/*One Packet Builder*/);
- C#
packetizer.SetSOFBuilder(/*One Header Builder*/); packetizer.AddEOFBuilder(/*One Header Builder*/); packetizer.AddPacketBuilder(/*One Packet Builder*/);
- Python
packetizer.SetSOFBuilder(/*One Header Builder*/) packetizer.AddEOFBuilder(/*One Header Builder*/) packetizer.AddPacketBuilder(/*One Packet Builder*/)
- Java
packetizer.SetSOFBuilder(/*One Header Builder*/); packetizer.AddEOFBuilder(/*One Header Builder*/); packetizer.AddPacketBuilder(/*One Packet Builder*/);
- Pack Data:
- C++
packetizer->GetPacket(/*raw_data*/, /*raw_data_size*/, /*result*/, /*result_size*/);
- C#
byte[] result = packetizer.SetSOFBuilder(/*raw_data*/);
- Python
result = packetizer.SetSOFBuilder(/*raw_data*/)
- Java
byte[] result = packetizer.SetSOFBuilder(/*raw_data*/);
- Unpack Data:
- C++
packetizer->UnpackData(/*packed_data*/, /*packed_data_size*/, /*result*/, /*result_size*/);
- C#
byte[] result = packetizer.UnpackData(/*packed_data*/);
- Python
result = packetizer.UnpackData(/*packed_data*/)
- Java
byte[] result = packetizer.UnpackData(/*packed_data*/);
- Customizing Headers and Footers: The module provides flexibility in defining header and footer types. Explore the documentation for details on customizing these components based on your application's needs.
- Configuring Encryption: To enable encryption, set the encryption parameters using the provided API. Refer to the documentation for a comprehensive guide on configuring encryption.
- Optimizing Compression: Fine-tune the compression settings to balance between compression ratio and computational overhead. The documentation contains information on optimizing compression for various scenarios.
Clone the repository to your local machine:
git clone https://github.com/OmidArdestani/BinaryDataPacketization.git