That's why I'm talking about what happened, but I noticed that I was writing code using GzipFile, so it's a memo.
A class that handles gzip in Python.
You can read and write a local Gzip file by passing the file name to the constructor, and a "like" Gzip object by passing fileobj.
In in the constructor of GzipFile, as shown in the figure below.
When reading a GzipFile, it goes through the BufferedReader (*).
GzipFile uses the default (io.DEFAULT_BUFFER_SIZE) for the BufferedReader's buffer size.
Depending on the io to be read, you may want to buffer in larger units (*). However, it seems that the buffer size cannot be changed by the function of GzipFile, so let's pass BufferedReader to fileobj of GzipFile.