XFile is a C# library for working with binary files that have a specific header. It provides features for reading, writing, and managing these binary files while maintaining the required file format.
- Create XFiles: Initialize new binary files with a custom or default XFile header.
- Write Binary Data: Write binary data to a file, including the XFile header.
- Append Data: Append binary data to an existing file.
- Read Binary Data: Read binary data from a file, skipping the XFile header.
- Read Text Data: Read text data from a file, supporting multiple encodings.
Please read the documentation for more information.
XFile xFile = new XFile();
byte[] data = // data
xFile.WriteAllBytes("file.dat", data);
byte[] additionalData = // data
xFile.Append("file.dat", additionalData);
byte[] data = xFile.ReadAllBytes("file.dat");
string text = xFile.ReadAllText("textfile.txt");
You can include XFile in your project using NuGet:
dotnet add package libXFile
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions and feedback are welcome! Feel free to open issues, create pull requests, or provide suggestions.
- This project was inspired by the need to work with a specific file format.