Skip to content

TeslenkoOleg/node-binary-search-in-file

Folders and files

NameName
Last commit message
Last commit date

Latest commit

c4979c2 · May 19, 2024

History

6 Commits
May 8, 2024
May 19, 2024
May 10, 2024
May 10, 2024
May 8, 2024
May 8, 2024
May 8, 2024
May 8, 2024
May 10, 2024
May 10, 2024
May 8, 2024
May 8, 2024

Repository files navigation

node-binary-search-in-file

How to find string in a big-sized file. Original source: https://github.com/koorchik/jabascript-materials/tree/main/inverted-index

How it works

  1. Run map.js to create file with key-value pairs - node map.js >./pairs.data (add file path inside map.js)
  2. Sort the file - sort -k1,1 ./pairs.data >./sorted.data (add file path inside sort command)
  3. Run index.js to find the key - node index.js apple 4 (apple is the key, 4 is the number of chunks bytes in the file, depends on the data size and the system memory)

About

How to find string in a big-sized file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published