updated readme, and fixed linux compilation

This commit is contained in:
bronku 2026-01-09 01:54:56 +01:00
parent 4becf40f06
commit 8390db169f
8 changed files with 48 additions and 1 deletions

39
README.md Normal file
View file

@ -0,0 +1,39 @@
# External Merge Sort (Big Buffer Strategy)
A C++20 implementation of an external sorting algorithm designed to sort files that are too large to fit into the system's RAM. This project uses a Big Buffer approach to minimize disk I/O by maximizing the use of available memory during both the initial run creation and the merging phases.
# Requirements
Clang++ or G++ (Support for C++20 required)
Make
# Compilation
```bash
make
````
# Usage
The binary is located in the build/ directory after compilation.
# Generate Data
# To generate a test file with 100,000 random records:
```bash
./build/main -g 100000 -o input.dat
```
# Sort Data
To sort the generated file using 11 buffers of 10 records each:
```bash
./build/main -i input.dat -o output.dat -n 11 -b 10
```
# Options
Flag Description
-i Input file path
-o Output file path
-n Number of buffers (minimum 3)
-b Size of each buffer (number of records)
-g Generate count random records
-e Evaluate and print the contents of a file
-d Temporary directory for merge runs