Skip to content

iter_chunks functionality rather than reading S3 file by line #669

Answered by mpenkov
pm-src asked this question in Q&A
Discussion options

You must be logged in to vote

If you open the read and write destinations in binary mode, you'll be able to do this:

while True:
   buf = fin.read(chunk_size)
   if not buf:
     break
   fout.write(chunk_size)

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by pm-src
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants