An open API service indexing awesome lists of open source software.

https://github.com/neuralcortex/endianness_changer

Converts Data from BigEndian to LittleEndian and vice versa.
https://github.com/neuralcortex/endianness_changer

big-endian bigendian binary binary-files endian endianness little-endian littleendian

Last synced: 5 months ago
JSON representation

Converts Data from BigEndian to LittleEndian and vice versa.

Awesome Lists containing this project

README

          

# Endianness Changer 1.0.0

![Endianness Changer](https://github.com/NeuralCortex/Endianness_Changer/blob/main/images/endian.png)

## 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
```java
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
```java
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:

- **Apache NetBeans 27 IDE**: [NetBeans 27](https://netbeans.apache.org/)
- **Java SDK**: [JDK 24](https://www.oracle.com/java/technologies/javase/)
- **SceneBuilder**: [Gluon SceneBuilder](https://gluonhq.com/products/scene-builder/) for GUI development
- **JavaFX SDK**: [JavaFX](https://gluonhq.com/products/javafx/)