hyparquet-compressors/src/index.js

16 lines
362 B
JavaScript
Raw Normal View History

2024-05-09 04:23:01 +00:00
import { snappyUncompressor } from 'hysnappy'
import pako from 'pako'
2024-05-20 04:09:36 +00:00
import { LZ4, LZ4_RAW } from './lz4.js'
2024-05-09 04:23:01 +00:00
/**
2024-05-19 23:21:38 +00:00
* @type {import('hyparquet').Compressors}
2024-05-09 04:23:01 +00:00
*/
export const compressors = {
SNAPPY: snappyUncompressor(),
2024-05-19 23:21:38 +00:00
GZIP: input => pako.ungzip(input),
2024-05-09 04:23:01 +00:00
BROTLI: () => new Uint8Array(), // TODO
ZSTD: () => new Uint8Array(), // TODO
2024-05-20 00:14:16 +00:00
LZ4,
2024-05-20 04:09:36 +00:00
LZ4_RAW,
2024-05-09 04:23:01 +00:00
}