Streams saves the day

Chibuike UkoChibuike Uko
1 min read

Keystrokes in progress...It all started when I was trying to create a small script, that can be used to encrypt a file and also decrypt the file as well. Not only encryption but the encryption should be efficient when working with large files. Then I started to ponder on the problem at hand, while in the process of brainstorming, the concept of streams came to me. I know streams help us work with large files that has a higher file size bigger than our available machine memory footprint. You may ask how does streams really help us work with higher file sizes bigger than our available machine memory footprint. It does this by dividing the file in small chunks that our machine can handle. So, with the concept of streams, I was able to solve the encryption problem I had earlier on. How did I? I invoked the encryption function on each chunk of the file being processed, this led to an incremental file encryption process that was efficient. I look forward to learning more deeper concepts I as journey through the HNG internship, you can join me on this internship journey as well with this link https://hng.tech/internship

To know more about the HNG program, use this link https://hng.tech/hire.

0
Subscribe to my newsletter

Read articles from Chibuike Uko directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Chibuike Uko
Chibuike Uko