GitXplorerGitXplorer
l

rscsv

public
16 stars
2 forks
0 issues

Commits

List of commits on branch master.
Verified
10706856be2e88861124360903437a6170886142

Version 0.6.0

llautis committed 6 years ago
Unverified
a2f78943c54e22267ba34207824e0387ce109fd6

Build native packages for MacOS Mojave

llautis committed 6 years ago
Unverified
e1ccd43cc325070f881cc805bc39a564a38ce31e

Update cargo packages

llautis committed 6 years ago
Unverified
1eb797841e4b40a9fd8ffe24c80c8fb2cfc7619b

Update Travis CI Ruby versions

llautis committed 6 years ago
Unverified
15c375e55c323a2544e3931e870019511f768bcd

Version 0.6.0.beta4

llautis committed 6 years ago
Unverified
8629121203fbf6f7e2d17eb5062e040a3e2edbeb

Update xcode version

llautis committed 6 years ago

README

The README file for this repository.

Rscsv

Fast CSV using Rust extensions. Can read arrays of arrays from strings and write strings from arrays of arrays.

Build Status

Installation

This gem requires Rust (~> 1.17) and Cargo to be installed. With those requirements fulfilled, rscsv can be installed like any other gem:

gem install rscsv

Usage

require 'rscsv'

Rscsv::Writer.generate_lines([['1', '2', '3'], ['3', '4', '5']])
# => 1,2,3\n4,5,6\n
Rscsv::Writer.generate_line(['1', '2', '3'])
# => 1,2,3\n

Rscsv::Reader.parse("1,2,3\n4,5,6\n")
# => [["1", "2", "3"], ["4", "5", "6"]]

# Streaming from Enumerator
Rscsv::Reader.each(["1,2,3\n","4,5,6\n"].each) do |row|
  # yields ["1", "2", "3"] and ["4", "5", "6"]
end

This is ~3x faster than using native Ruby CSV.generate or CSV.parse.