GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing cpp.libhunt.com — Vince's CSV Parser Alternatives - C++ CSV | LibHunt Vince's CSV ParserA modern C++ CSV parser and serializer that doesn't make you choose between ease of use or performance.
Take the C++ Developer Survey
- About 6 minutes on the tools, libraries and AI you use with C++. You get the results by email.
Take the survey »
Popularity
5.6
Growing
Activity
8.8
-
Stars
1,142
Watchers
23
Forks
209
Last Commit
DescriptionThere's plenty of other CSV parsers in the wild, but I had a hard time finding what I wanted. Inspired by Python's csv module, I wanted a library with simple, intuitive syntax. Furthermore, I wanted support for special use cases such as calculating statistics on very large files. Thus, this library was created with these following goals in mind.
Programming language: C++
License: MIT License
Latest version: v5.3.0
Vince's CSV Parser alternatives and similar libraries
Based on the "CSV" category.
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
Promo
www.saashub.com
Do you think we are missing an alternative of Vince's CSV Parser or a related project? READMEVince's CSV ParserMotivationThere's plenty of other CSV parsers in the wild, but I had a hard time finding what I wanted. Inspired by Python's Performance and Memory RequirementsWith the deluge of large datasets available, a performant CSV parser is a necessity. By using overlapped threads, memory mapped IO, and efficient data structures, this parser can quickly tackle large CSV files. Furthermore, this parser has a minimal memory footprint and can handle larger-than-RAM files. Show me the numbersOn my computer (Intel Core i7-8550U @ 1.80GHz/Toshiba XG5 SSD), this parser can read
Robust Yet FlexibleRFC 4180 and BeyondThis CSV parser is much more than a fancy string splitter, and parses all files following RFC 4180. However, in reality we know that RFC 4180 is just a suggestion, and there's many "flavors" of CSV such as tab-delimited files. Thus, this library has:
By default, rows of variable length are silently ignored, although you may elect to keep them or throw an error. EncodingThis CSV parser is encoding-agnostic and will handle ANSI and UTF-8 encoded files. It does not try to decode UTF-8, except for detecting and stripping UTF-8 byte order marks. Well TestedThis CSV parser has an extensive test suite and is checked for memory safety with Valgrind. If you still manage to find a bug, do not hesitate to report it. DocumentationIn addition to the Features & Examples below, a fully-fledged online documentation contains more examples, details, interesting features, and instructions for less common use cases. IntegrationThis library was developed with Microsoft Visual Studio and is compatible with >g++ 7.5 and clang.
All of the code required to build this library, aside from the C++ standard library, is contained under C++ VersionWhile C++17 is recommended, C++11 is the minimum version required. This library makes extensive use of string views, and uses
Martin Moene's string view library if Single HeaderThis library is available as a single CMake InstructionsIf you're including this in another CMake project, you can simply clone this repo into your project directory, and add the following to your CMakeLists.txt:
Features & ExamplesReading an Arbitrarily Large File (with Iterators)With this library, you can easily stream over a large file without reading its entirety into memory. C++ Style
Old-Fashioned C Style Loop
Memory-Mapped Files vs. StreamsBy default, passing in a file path string to the constructor of However, Note: Currently CSV guessing only works for memory-mapped files. The CSV dialect must be manually defined for other sources.
Indexing by Column NamesRetrieving values using a column name string is a cheap, constant time operation.
Numeric ConversionsIf your CSV has lots of numeric values, you can also have this parser (lazily) convert them to the proper data type.
Converting to JSONYou can serialize individual rows as JSON objects, where the keys are column names, or as JSON arrays (which don't contain column names). The outputted JSON contains properly escaped strings with minimal whitespace and no quoting for numeric values. How these JSON fragments are assembled into a larger JSON document is an exercise left for the user.
Specifying the CSV FormatAlthough the CSV parser has a decent guessing mechanism, in some cases it is preferrable to specify the exact parameters of a file.
Trimming WhitespaceThis parser can efficiently trim off leading and trailing whitespace. Of course, make sure you don't include your intended delimiter or newlines in the list of characters to trim.
Handling Variable Numbers of ColumnsSometimes, the rows in a CSV are not all of the same length. Whether this was intentional or not, this library is built to handle all use cases.
Setting Column NamesIf a CSV file does not have column names, you can specify your own:
Parsing an In-Memory String
Writing CSV Files
You can pass in arbitrary types into ContributingBug reports, feature requests, and so on are always welcome. Feel free to leave a note in the Issues section. Do not miss the trending, libraries, news and articles with our weekly report.
Spin The Wheel Of Names
for a cryptographically secure random name picker.
Schedule a when to meet poll. |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |