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 |
|
||
Copyright © 2024 ZhangZhihuiAAA
Powered by .NET 9.0 on Kubernetes |