{"id":31790119,"url":"https://github.com/konstantine-v/zig-csv-exporter","last_synced_at":"2025-10-10T15:21:43.901Z","repository":{"id":314472889,"uuid":"894773833","full_name":"konstantine-v/zig-csv-exporter","owner":"konstantine-v","description":"A CSV parser written Zig to practice learning the language - Example repo","archived":false,"fork":false,"pushed_at":"2025-09-12T16:00:07.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-12T18:40:14.672Z","etag":null,"topics":["csv","zig"],"latest_commit_sha":null,"homepage":"","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/konstantine-v.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-27T00:54:26.000Z","updated_at":"2025-09-12T16:00:10.000Z","dependencies_parsed_at":"2025-09-12T18:40:18.356Z","dependency_job_id":"095601dd-e26f-4ce8-a8ee-64dfd6de1b9d","html_url":"https://github.com/konstantine-v/zig-csv-exporter","commit_stats":null,"previous_names":["konstantine-v/zig-csv-exporter"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/konstantine-v/zig-csv-exporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konstantine-v%2Fzig-csv-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konstantine-v%2Fzig-csv-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konstantine-v%2Fzig-csv-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konstantine-v%2Fzig-csv-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/konstantine-v","download_url":"https://codeload.github.com/konstantine-v/zig-csv-exporter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konstantine-v%2Fzig-csv-exporter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279004576,"owners_count":26083735,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["csv","zig"],"created_at":"2025-10-10T15:21:42.662Z","updated_at":"2025-10-10T15:21:43.893Z","avatar_url":"https://github.com/konstantine-v.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"## CSV Parse Test\nUsing the Kaggle dataset for student records: https://www.kaggle.com/datasets/muhammadroshaanriaz/students-performance-dataset-cleaned/data\n\n\nThe idea for this was to practice using Zig and learn how to use it in a sort of real scenario for parsing data.\n\nThe data is read, parsed to how I wanted it, then output in the terminal. \n\nThe output file is more compact reducing the size from ~550Kb -\u003e ~320Kb. \n\n## Prerequisites\n- Zig 0.14.1 (latest as of Sept 2025)\n- CSV file (the one from Kaggle) -\u003e `students.csv`\n\n### Example Input\n```\n0,group B,bachelor's degree,1,0,72,72,74,218,72.66666666666667\n0,group C,some college,1,1,69,90,88,247,82.33333333333333\n0,group B,master's degree,1,0,90,95,93,278,92.66666666666667\n1,group A,associate's degree,0,0,47,57,44,148,49.333333333333336\n1,group C,some college,1,0,76,78,75,229,76.33333333333333\n...\n```\n\n### Example Output\n```\n106046538, 158428504, 114733021, 562814124, 693315403, 97642958, 91631580, 621417895, 749740099, 76127794, 701406004, 768219691, 80767177, 561226822, 46963386, 139552206, 685124822, 67407900...\n```\nThis allows for a more optimized size which is better for when reading it and storing in a db or whatever a user would want.\n\n### Execution Time\nI can run the program and it takes about `0.083` total seconds to run on my machine.\n```\n./main  0.03s user 0.06s system 98% cpu 0.083 total\n```\n\n### Compression\nThe data is being compressed for better storage of data by taking the input values, storing as correct unisigned integer values, then turning that data into a hex value. Further Compression can be done via gzip and other methods.\n\n`56.6kB -\u003e 10.9kB`\n\n### Changelog\n- 2025-09-03: compressing output data to hex value\n- 2025-09-03: Updated code to work with the latest Zig version\n\n### Notes\nThe code needs some obvious improvements but this is mainly so I can learn and improve as I learn.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkonstantine-v%2Fzig-csv-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkonstantine-v%2Fzig-csv-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkonstantine-v%2Fzig-csv-exporter/lists"}