Skip to content

Commit

Permalink
read first 100k bytes
Browse files Browse the repository at this point in the history
needed for ara-bukhari
  • Loading branch information
fawazahmed0 committed Feb 10, 2024
1 parent 314e8b3 commit 36ab1e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apiscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,8 @@ async function jsonDB(singlefile) {

var filepath = path.join(linebylineDir, filename)
var fileSize = fs.statSync(filepath).size
// read the first 25k bytes of file to be stored as snippet in jsondb object
var data = await streamRead(filepath, 0, 25_000)
// read the first 100k bytes of file to be stored as snippet in jsondb object
var data = await streamRead(filepath, 0, 100_000)

jsondb[filename] = {}
// taking verse from line 11 to 20 and storing it for searching and duplicate detection
Expand Down

0 comments on commit 36ab1e8

Please sign in to comment.