问题
I have sniffed what webread sends over Internet and found that it doesn't use any gzip headers. This makes transferring of big JSON and CSV files impossible.
Can I activate gzip support somehow?
回答1:
When using webread it is possible to specify additional HTTP headers with weboptions.
The syntax for an additional header:
options = weboptions('KeyName','Name','KeyValue','Value')
Where Name and Value are the name of the header and its value respectively. To enable gzip, you must specify the required HTTP header.
options = weboptions('KeyName','Accept-Encoding','KeyValue','gzip')
You can then use the options to perform your request.
data = webread(url,options)
来源:https://stackoverflow.com/questions/50457391/is-it-possible-to-activate-gzip-support-in-matlabs-webread