avian2 / unidecode

ASCII transliterations of Unicode text - GitHub mirror
https://pypi.python.org/pypi/Unidecode
GNU General Public License v2.0
516 stars 62 forks source link

Read input line by line #75

Closed critias closed 2 years ago

critias commented 2 years ago

The current implementation always reads the whole input before decoding. This causes problems with large files, e.g.: zcat larget_file.gz | unidecode | head will take much longer and use more memory than necessary.

This PR will change this by reading the input line by line. This makes it also possible to use the script with unbuffered stdin and stdout streams.

avian2 commented 2 years ago

Merged. Thanks!