how store and search 7z text database
by - Thursday, January 1, 1970 at 12:00 AM
hello
how you store and search the 7z .txt databases?
without decompressing
open source script welcome
thank you
Reply
Not possible unfortunately because you have to decompress the file to read its content in the first place, plus it'd be very slow to search, decompressing each file every time you search
Reply
Why would you need to keep the txt compressed?
Reply
Buy two HDDs 3,5 inch 4 TB and one HDD Ray box and do not think about it
Reply
The easiest way (without the use of databases and specialized programs) is to sort all the lines in the file alphabetically, then break it into several thousand pieces and archive each such piece separately. Save the first lines of each fragment in a separate file. When you need to find something, it will be enough to unpack one small archive and search in it. Disadvantages - you can search only at the beginning of lines. Pluses - with sufficiently large databases, due to alphabetical ordering, compression will be even more efficient than when archiving the entire database.
Reply
You'd either need to decompress it or stream it in real-time and search through it possibly with something like grep or sift but the best/easiest solution would be to import it into something like MySQL to make searches faster and easier.
Reply
Use GZ instead with ripgrep, there is a thread that explains it here
Reply


 Users viewing this thread: how store and search 7z text database: No users currently viewing.