michaelqq / dbfstream Goto Github PK
View Code? Open in Web Editor NEWdbf file parser (stream version)
dbf file parser (stream version)
Hi,
Thanks for sharing the efficient dbf library. I found it works properly in node LTS 8.x (tested with 8.10 and 8.15.1) but can not get through 300 records in node 10 (10.15.0 and 10.15.3). The 'data' event stops getting called back at record 289 and the 'end' event never get fired.
Any one know why? How about replacing "stream" with "readable-stream" (https://github.com/nodejs/readable-stream) for node 9 and 10 compatiblity ?
Thanks alot,
John
Hi,
How can I make the dbfstream wait for a callback?
Sam
I try to use this module, but i get error
"stream-dbf" npm module works, but i need convert encoding.
Please help me improve this error
My code is:
const dbfstream = require('dbfstream'); let fileName = 'ADDROB01.DBF'; var dbf = dbfstream(fileName, 'utf-8'); dbf.on('data', (data) => { console.log(data); });
internal/buffer.js:53
throw new ERR_BUFFER_OUT_OF_BOUNDS();
^
RangeError [ERR_BUFFER_OUT_OF_BOUNDS]: Attempt to write outside buffer bounds
at boundsError (internal/buffer.js:53:11)
at Buffer.readInt32LE (internal/buffer.js:277:5)
at getHeader (C:\Users\a\Desktop\npm\node_modules\dbfstream\index.js:44:40)
at ReadStream.readStream.once (C:\Users\a\Desktop\npm\node_modules\dbfstream\index.js:124:21)\index.js:124:21)
at Object.onceWrapper (events.js:273:13)
at ReadStream.emit (events.js:187:15)
at emitReadable_ (_stream_readable.js:531:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
Hi!
I'm trying to read a file that has some Integer columns.
I saw that for this type of column the raw data is returned, so I parsed it using readInt32LE(). At first most of the data in those columns were read incorrectly, then I found the problem was the "replace" to remove white space, so I changed it to check if the column type is "I" and only remove if it isn't.
Doing so most of the data started reading correctly, but in a table with ~9500 records 25 aren't reading correctly. In those it is reading more than 4 bytes for that column. I couldn't find any pattern for this behavior and the other columns in those rows are read correctly.
What information would help troubleshoot this problem?
Thanks in advance.
Could you bump the version of this for the recent changes? I see that package.json was changed, did you npm publish
? I still see 1.0.19 on npmjs.com.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.