-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LazyIO - network and local file reader/writer compatible with go-streams. #10
Comments
Hi @BigB84 , we can definitely think about a solution for this case. How are you reading the files and how do you intend to iterate over them?
|
Thanks for reply! I think it's second case you mentioned. Actually It's not secret so I can share the actual problem. I maintain DNS with domain blocklist. Blocklist is built using hostlists. Consider just a few formats of hostlists written that way: 127.0.0.1 example.com
127.0.0.1 subdomain.of.example.com
127.0.0.1 another.subdomain.of.example.com
127.0.0.1 something.1.example.com
...
0.0.0.0 example.com
0.0.0.0 subdomain.of.example.com
0.0.0.0 another.subdomain.of.example.com
0.0.0.0 something.2.example.com
... example.com
subdomain.of.example.com
another.subdomain.of.example.com
something.3.example.com
... Each one I need to process that way they are cleaned from unwanted expressions ( All set of rules is more complicated, so that's why I use lazy streams for efficient mapping and filtering. In this case I need reader of type string. Shall we write two readers for instance: In the future someone may need to implement reading integers byte by byte so he/she would Implement such reader as What do you think? |
Hi!
With Java 8+ it's possible to read file using streams instead of using loop.
This is so cool, as file isn't read entirely to memory.
Now I'm facing this issue with go.
I need to read hundreds of text files with millions of records and process them.
Thus I need reader and writer that will be compatible with this library.
I tried to do so but it's hard considering implementing generic interface
IIterator
The strength of java in this case is the fact that streams became standard.
Do you think it's possible to include such
io.reader
orbufio.scanner
to this library?The text was updated successfully, but these errors were encountered: