mirror of
https://github.com/giongto35/cloud-game.git
synced 2026-07-22 17:47:11 +00:00
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).
20 lines
332 B
Go
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
|
|
}
|
|
}
|