feat: (?:de|in)flation

This commit is contained in:
cha0s 2019-10-02 18:06:31 -05:00
parent 2a0a2f1819
commit 9f31d98f5b
3 changed files with 13 additions and 0 deletions

View File

@ -39,3 +39,4 @@
about inventory change
- ❌ afterDestructionTickers shouldn't exist... destruction should be deferred
- ❌ Remove position pack check from trait and add to Vector
- ❌ zLib dictionary for packet compression

11
packages/core/flate.js Normal file
View File

@ -0,0 +1,11 @@
import {deflateSync, inflateSync} from 'zlib';
export function inflate(buffer) {
return inflateSync(buffer);
}
export function deflate(buffer) {
return deflateSync(buffer, {
level: 9,
});
}

View File

@ -120,4 +120,5 @@ export {
mergeDiffPrimitive,
} from './merge-diff';
export {fastApply} from './fast-apply';
export {inflate, deflate} from './flate';
export {PropertyMixin as Property} from './property';