PHPackages                             andileco/csvsort - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. andileco/csvsort

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

andileco/csvsort
================

High-performance CSV sorting library using external merge sort algorithm for massive files. Built for drupal/views\_csv\_source with league/csv integration.

01PHP

Since Jan 20Pushed 5mo agoCompare

[ Source](https://github.com/andileco/csvsort)[ Packagist](https://packagist.org/packages/andileco/csvsort)[ RSS](/packages/andileco-csvsort/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

andileco/csvsort
================

[](#andilecocsvsort)

[![PHP Version](https://camo.githubusercontent.com/02463ad42fbbb8e930dc93f83e8b2ecd9ad3f718d33bb429f5f8f792f9cfd2e5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545382e342d626c75652e737667)](https://php.net)[![License](https://camo.githubusercontent.com/8bb50fd2278f18fc326bf71f6e88ca8f884f72f179d3e555e20ed30157190d0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667)](LICENSE)

**High-performance CSV sorting library for PHP 8.4+**

Sort massive CSV files (gigabytes+) with minimal memory usage using an external merge sort algorithm. Built specifically for `drupal/views_csv_source` integration with `league/csv`.

Features
--------

[](#features)

- ✅ **Memory-Efficient**: Sort multi-gigabyte CSVs with constant memory usage
- ✅ **External Merge Sort**: Industry-standard algorithm for large datasets
- ✅ **K-Way Merge**: Optimized multi-file merging with min-heap
- ✅ **League/CSV Integration**: Seamless compatibility with league/csv ^9.27
- ✅ **PHP 8.4+**: Modern PHP with strict types, readonly properties, enums
- ✅ **Multiple Comparators**: String, numeric, natural, datetime, boolean sorting
- ✅ **Multi-Column Sorting**: Sort by multiple columns with custom directions
- ✅ **Progress Tracking**: Built-in metrics and performance monitoring
- ✅ **Production Ready**: Comprehensive tests and documentation

Installation
------------

[](#installation)

```
composer require andileco/csvsort
```

Quick Start
-----------

[](#quick-start)

```
