mirror of
https://github.com/kmitresse/Compo-Service-Log-Project.git
synced 2026-05-16 17:11:48 +00:00
feat: Stream download, extract and parse datasets
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import { Archive, ZipArchive, ArchiveType, GzipArchive } from "./";
|
||||
|
||||
class ArchiveFactory {
|
||||
static getArchive(archiveType: ArchiveType): Archive {
|
||||
if (archiveType === ArchiveType.ZIP) return ZipArchive.instance;
|
||||
if ([ArchiveType.GZIP, ArchiveType.GZ].includes(archiveType)) return GzipArchive.instance;
|
||||
|
||||
throw new Error("Unsupported archive type");
|
||||
}
|
||||
}
|
||||
|
||||
export default ArchiveFactory;
|
||||
Reference in New Issue
Block a user