Not sure why writing the same data as miniseed is smaller, might be that
it's writing with a different record size that is more efficiently
compressing the data..
Doing manipulations (filter, instrument correction etc) leads to data
being converted to float, and miniseed storing float is much less
efficient than integer compression.
Not sure about SAC but I think it's stored without compression,
therefore the larger file size.
The first MiniSEED file might be smaller for a couple of reasons
(reading and writing MiniSEED with ObsPy should not change the record
length nor the encoding):
(i) The records might have been padded due to whatever reasons. ObsPy
would have removed the padding.
(ii) There might have been some blockettes and using `obspy.core` to
read and write MiniSEED does not retain all blockettes.
(iii) Maybe there were some noise/shadow records in the data? ObsPy also
removes those.
The second MiniSEED file is likely larger because the instrument
deconvolution converted the data to double precision floats. Otherwise
MiniSEED and SAC should be very similar in size as neither compresses
floating point data and the difference is only in headers and the fact
that MiniSEED is bound to its record size.
You can convert your data to single precision before writing it which
should result in a smaller MiniSEED file: