Giter VIP home page Giter VIP logo

dbfstream's People

Contributors

kinolaev avatar konstantinrdark avatar michaelqq avatar mickeyjohn avatar mst-work avatar trescube avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

dbfstream's Issues

'end' event never emitted with node v10.x

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

Callback

Hi,

How can I make the dbfstream wait for a callback?

Sam

RangeError [ERR_BUFFER_OUT_OF_BOUNDS]: Attempt to write outside buffer bounds

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)

Not reading Integer column correctly

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.

Version bump

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.