Skip to content

A versatile tool developed in C++, C#, and Python for packing raw data into a structured format suitable for transmission over Ethernet or other communication channels.

Notifications You must be signed in to change notification settings

OmidArdestani/Binary-Data-Packetization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Binary Data Packetization Module

Overview

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.

Features

  • 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.

Getting Started

Prerequisites

Usage

  1. Create an Instance:
    • C++
    CBinaryDataPacketizer *packetizer = new BinaryDataPacketizer();
    • C#
    BinaryDataPacketizer packetizer = new BinaryDataPacketizer();
    • Python
    packetizer = BinaryDataPacketizer()
    • Java
    BinaryDataPacketizer packetizer = new BinaryDataPacketizer();
  2. 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*/);
  3. 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*/);
  4. 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*/);

Advanced Usage

  • 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.

Library Class Diagram (UML)

Binary Data Packetization Class Diagram

Clone the repository to your local machine:

git clone https://github.com/OmidArdestani/BinaryDataPacketization.git

About

A versatile tool developed in C++, C#, and Python for packing raw data into a structured format suitable for transmission over Ethernet or other communication channels.

Topics

Resources

Stars

Watchers

Forks