Last active
October 10, 2016 20:24
-
-
Save flimshaw/56ae49e09beef5e67555a07bf777b83d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function processFile(file) { | |
fs.createReadStream(file) // open the gzipped csv file and start sending chunks of it downstream | |
.pipe(zlib.createGunzip()) // once you get a chunk, decompress it and pass it downstream | |
.pipe(csv()) // convert the decompressed chunk into individual rows and values | |
.on('data', processRow(row)) // if a row has a parallax measurement, calculate its position and write it to a new file | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment