Skip to content

NeuralCortex/Endianness_Changer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Endianness Changer 1.0.0

Endianness Changer

Overview

Endianness Changer is a JavaFX application designed to convert binary files between Big-Endian and Little-Endian formats. It is particularly useful for programming languages that lack built-in endianness conversion functions, unlike Java's ByteBuffer class, which simplifies such operations.

The program supports binary files with the following requirements:

  • No header
  • No trailer
  • No separator

Features

  • Converts binary files between Big-Endian and Little-Endian formats.
  • Supports various data type sizes (e.g., 16-bit, 64-bit).
  • Allows batch file selection and conversion.
  • User-friendly JavaFX interface with options to specify output format (uppercase or lowercase).
  • Exports converted files to a user-specified directory.

How It Works

In Java, endianness conversion is straightforward using the ByteBuffer class. Below are examples for reference:

Example 1: Converting a 16-bit Short

byte[] buffer = new byte[2];
// Fill buffer with data
ByteBuffer bb = ByteBuffer.wrap(buffer);
short result = bb.order(ByteOrder.BIG_ENDIAN).getShort();

Example 2: Converting a 64-bit Double

byte[] buffer = new byte[8];
// Fill buffer with data
ByteBuffer bb = ByteBuffer.wrap(buffer);
double result = bb.order(ByteOrder.LITTLE_ENDIAN).getDouble();

For languages without such utilities, Endianness Changer provides a simple solution to convert binary files.

Usage

  1. Select the directory containing the input binary files.
  2. Choose the files to convert.
  3. Specify the output format (uppercase or lowercase).
  4. Select the data type size (e.g., 16-bit or 64-bit).
  5. Choose a different directory to save the converted files (avoid using the input directory).
  6. Start the conversion process and wait for completion.

Technologies Used

This project was developed using the following tools and frameworks:

About

Converts Data from BigEndian to LittleEndian and vice versa.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published