Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/markpflug/sylvan.data.xbase
The fastest .NET library for reading xBase (.dbf) data files.
https://github.com/markpflug/sylvan.data.xbase
data dbase dbf dotnet xbase
Last synced: 3 days ago
JSON representation
The fastest .NET library for reading xBase (.dbf) data files.
- Host: GitHub
- URL: https://github.com/markpflug/sylvan.data.xbase
- Owner: MarkPflug
- License: mit
- Created: 2021-11-03T01:35:51.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-07-31T21:48:54.000Z (over 2 years ago)
- Last Synced: 2024-11-08T10:52:22.096Z (5 days ago)
- Topics: data, dbase, dbf, dotnet, xbase
- Language: C#
- Homepage:
- Size: 89.8 KB
- Stars: 7
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.txt
Awesome Lists containing this project
README
# Sylvan.Data.XBase
The fastest "XBase" data reader available for .NET. XBase is a file format used by DBase, FoxPro, and Clipper database applications which were popular in the '90s. It still used as the storage format for metadata in ESRI shape files.
Sylvan.Data.XBase provides a forward-only reader that allows reading data over a non-seekable stream. This means that it is possible to read records directly out of a zip archive, which is common for shapefiles. Memo data does not neccessarily support forward only reading, but shape files don't normally include memo data. This library does not currently support writing XBase files, it only supports reading.
### Installation
[Sylvan.Data.XBase Nuget Package](https://www.nuget.org/packages/Sylvan.Data.XBase/)
`Install-Package Sylvan.Data.XBase`
## Example
__Simple Reading__
```C#
using Sylvan.Data.XBase;using var reader = XBaseDataReader.Create("data.dbf");
while(reader.Read())
{
var id = reader.GetInt32(0);
var name = reader.GetString(1);
}```
__Convert to CSV__
```C#
using Sylvan.Data.Csv;
using Sylvan.Data.XBase;using var reader = XBaseDataReader.Create("data.dbf");
using var writer = CsvDataWriter.Create("data.csv");
writer.Write(reader);```