cloud-game/pkg/compression/compression.go
sergystepanov 54ee9a7af3
Savestate compression (#374)
Added the optional saveCompression configuration parameter which enables ZIP compression of the emulator states, reducing files sizes by the factor of 10x (most of these state files store zeroes).
2022-08-05 22:44:40 +03:00

20 lines
332 B
Go

package compression
import (
"path/filepath"
"github.com/giongto35/cloud-game/v2/pkg/compression/zip"
)
type Extractor interface {
Extract(src string, dest string) ([]string, error)
}
func NewExtractorFromExt(path string) Extractor {
switch filepath.Ext(path) {
case zip.Ext:
return zip.New()
default:
return nil
}
}