aboutsummaryrefslogtreecommitdiff
path: root/decompressor.py
blob: c54dec9528529c0d3bb30406b4c13423cdf26281 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from os.path import exists
import zlib

def decompress_arima():
    if not exists('arima.pkl'):
        if not exists('arima.compressed'):
            raise FileNotFoundError('arima.compressed not found')
        else:
            print('Decompressing arima.compressed')
            with open('arima.compressed', 'rb') as f:
                data = zlib.decompress(f.read())
            with open('arima.pkl', 'wb') as f:
                f.write(data)

decompress_arima()