【文件属性】:
文件名称:csv-protobuf-stream:编码csv到protobuf
文件大小:2KB
文件格式:ZIP
更新时间:2021-05-13 11:22:57
JavaScript
csv到protobuf
编码csv到protobuf
npm install csv-protobuf-stream
用法
var csvProtobuf = require ( 'csv-protobuf-stream' ) ;
var split = require ( 'binary-split' ) ;
var encoder = csvProtobuf ( ) ;
fs . createReadStream ( 'data.csv' ) . pipe ( split ( ) ) . pipe ( encoder ) . on ( 'data' , function ( data ) {
console . log ( 'protobuf row:' , data ) ;
console . log ( 'protobuf schema:' , encoder . sch
【文件预览】:
csv-protobuf-stream-master
----.gitignore(13B)
----README.md(393B)
----package.json(688B)
----index.js(1KB)