Using io.Copy is about twice as fast and uses only a fraction (less than 1%) of the memory. With really large files, if you’re using the io.ReadAll and os.WriteFile , you might run out of memory quickly.
ZhangZhihui's Blog |
|
||
![]() |
|
博客园
|