{"id":13562581,"url":"https://github.com/erpuno/ecsv","last_synced_at":"2025-04-03T18:34:00.514Z","repository":{"id":57492602,"uuid":"269152973","full_name":"erpuno/ecsv","owner":"erpuno","description":"💠 ECSV: Потоковий CSV парсер","archived":false,"fork":true,"pushed_at":"2023-03-06T12:15:54.000Z","size":99,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-08T10:38:00.729Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Erlang","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"altworx/ecsv","license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/erpuno.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-03T17:33:31.000Z","updated_at":"2022-07-16T14:17:56.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/erpuno/ecsv","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erpuno%2Fecsv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erpuno%2Fecsv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erpuno%2Fecsv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erpuno%2Fecsv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erpuno","download_url":"https://codeload.github.com/erpuno/ecsv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247057152,"owners_count":20876523,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T13:01:10.156Z","updated_at":"2025-04-03T18:33:55.506Z","avatar_url":"https://github.com/erpuno.png","language":"Erlang","funding_links":[],"categories":["CSV"],"sub_categories":[],"readme":"\n\n# Erlang NIF CSV parser and writer #\n\n[![Hex pm](http://img.shields.io/hexpm/v/ecsv.svg?style=flat\u0026x=1)](https://hex.pm/packages/ecsv)\n\nCopyright (c) 2016 Altworx\n\n__Version:__ 0.2.0\n\n__Authors:__ Hynek Vychodil ([`hynek.vychodil@altworx.com`](mailto:hynek.vychodil@altworx.com)).\n\n__See also:__ [ecsv](http://github.com/altworx/ecsv/blob/master/doc/ecsv.md).\n\n`ecsv` is fast NIF parser and writer based on [`libcsv`](https://sourceforge.net/projects/libcsv/)\n\nThe main purpose of the module is the fast parsing of CSV data in GB volumes.\nThis requirement leads to the necessity of stream oriented API (see [`ecsv:parse_stream/4`](http://github.com/altworx/ecsv/blob/master/doc/ecsv.md#parse_stream-4)).\n\n\n### \u003ca name=\"Building\"\u003eBuilding\u003c/a\u003e ###\n\nApplication requires development files for [`libcsv`](https://sourceforge.net/projects/libcsv/) version 3.0.x\n(tested with 3.0.3). For example in debian you need run\n\n```\napt-get install libcsv3 libcsv-dev\n```\n\nFor building you need installed [`rebar3`](https://www.rebar3.org/).\n\n```\nrebar3 compile\n```\n\nAnd run tests using\n\n```\nrebar3 eunit\n```\n\n\n### \u003ca name=\"Running\"\u003eRunning\u003c/a\u003e ###\n\nFor interactive Erlang shell use\n\n```\nrebar3 shell\n```\n\nTry as starter\n\n```\n1\u003e ecsv:parse(\u003c\u003c\"Hello,World\"\u003e\u003e).\n[{\u003c\u003c\"Hello\"\u003e\u003e,\u003c\u003c\"World\"\u003e\u003e}]\n```\n\nSee [`ecsv`](http://github.com/altworx/ecsv/blob/master/doc/ecsv.md) for API description.\n\n\n### \u003ca name=\"Known_performance_caveats\"\u003eKnown performance caveats\u003c/a\u003e ###\n\n[`ecsv:write/1`](http://github.com/altworx/ecsv/blob/master/doc/ecsv.md#write-1) and [`ecsv:write_lines/1`](http://github.com/altworx/ecsv/blob/master/doc/ecsv.md#write_lines-1) doesn't perform as\nexpected. For an unknown reason, it is slower than pure Erlang implementation\nwhen compiled using HiPE and used in a real application. On the other hand,\n[`ecsv:parse_stream/5`](http://github.com/altworx/ecsv/blob/master/doc/ecsv.md#parse_stream-5) met expectations and performs around 100MB/s on\ncommodity HW (i7 2.6GHz).\n\nCurrent implementation uses `enif_make_new_binary()` for parsed fields. From\nour experience, this call allocates small binaries on the process heap in\ncontrast to `enif_alloc_binary()` always allocates on the binary heap which\nis slightly slower. Fields from currently parsed line is kept between NIF\ncalls in an own environment which could lead to bad behavior when [`parse_raw/3`](http://github.com/altworx/ecsv/blob/master/doc/README.md#parse_raw-3) is called with very short binaries and there is a long row with\nmany fields. In an extreme case, one long line with short or in worst case\nempty fields will lead to quadratic behavior if fed one byte a time. If you\nwould like parse CSV file with more than 20kB rows with thousands of fields\nyou should probably use another parser or fix the issue.\n\n\n## Modules ##\n\n\n\u003ctable width=\"100%\" border=\"0\" summary=\"list of modules\"\u003e\n\u003ctr\u003e\u003ctd\u003e\u003ca href=\"http://github.com/altworx/ecsv/blob/master/doc/ecsv.md\" class=\"module\"\u003eecsv\u003c/a\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferpuno%2Fecsv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferpuno%2Fecsv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferpuno%2Fecsv/lists"}