https://github.com/farmergreg/adif
High Peformance ADI / ADIF Library For Ham Radio Logs
https://github.com/farmergreg/adif
Last synced: 5 months ago
JSON representation
High Peformance ADI / ADIF Library For Ham Radio Logs
- Host: GitHub
- URL: https://github.com/farmergreg/adif
- Owner: farmergreg
- License: bsd-3-clause
- Created: 2024-12-29T23:45:58.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-10-12T00:47:17.000Z (10 months ago)
- Last Synced: 2026-01-15T03:30:41.048Z (6 months ago)
- Language: Go
- Homepage: https://www.hamradiolog.net/
- Size: 1.68 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ⚡ High Performance ADI Parser for Go
This library provides high-performance processing of [ADIF](https://adif.org/) (Amateur Data Interchange Format) ADI files used for ham radio logs.
[](https://github.com/farmergreg/adif/actions/workflows/test.yml)
[](https://goreportcard.com/report/github.com/farmergreg/adif/v5)
[](https://pkg.go.dev/github.com/farmergreg/adif/v5)
[](https://github.com/farmergreg/adif/blob/main/go.mod)
[](https://github.com/farmergreg/adif/blob/main/LICENSE)
## ✨ Features
- 🔬 **Tested**: 100% test coverage!
- 🔧 **Developer Friendly**: Clean, idiomatic, mock friendly interfaces
- 🚀 **Blazing Fast**: 2.4x-20x faster than [other libraries](https://github.com/farmergreg/adif-benchmark)
- 💡 **Memory Efficient**: Uses 2.2x less memory and makes 3.8 fewer allocations than the nearest competitor.
## 🚀 Quick Start
```bash
go get github.com/farmergreg/adif/v5
```
1) [ADI Processing Example](./example_adi_test.go)
2) ADX XML Processing: Not implemented. PR(s) welcome!
3) [JSON Processing Example](./example_json_test.go): Experimental. Not optimized; not part of the ADIF Specification.
## Benchmarks
Please see the [Go ADIF Parser Benchmarks](https://github.com/farmergreg/adif-benchmark) project for benchmarks.
TLDR, this library processes ADI data 3x faster than the go standard library can process the same data in json format.
This library is 2.4x faster than the nearest competing ADI parser.
## 🔧 Technical Deep Dive (ADI Parser)
The ADI parser in this library achieves high performance through the following optimizations:
### Performance Optimizations
- Leverages stdlib I/O operations with SSE/SIMD acceleration depending upon your CPU architecture
- Smart buffer pre-allocation based on discovered record sizes
- Optimized base-10 integer parsing for ADIF field lengths
### Memory Management
- Zero-copy techniques minimize memory operations
- String interning of repeated field names greatly reduces copying, allocations, and memory use
- Minimal temporary allocations during field parsing
- Dynamic buffer sizing based on learned field counts
- Buffer pooling
## Related Projects
If you found this library useful, you may also be interested in the following projects:
- [Go ADIF Parser Benchmarks](https://github.com/farmergreg/adif-benchmark)
- [Go ADIF Specification](https://github.com/farmergreg/spec)
- [g3zod/CreateADIFTestFiles](https://github.com/g3zod/CreateADIFTestFiles) ADI Test Files
- [g3zod/CreateADIFExportFiles](https://github.com/g3zod/CreateADIFExportFiles) ADIF Workgroup Specification Export Tool
## 📝 License
This project is licensed under the BSD 3-Clause License - see the [LICENSE](LICENSE) file for details.