-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #533 from streamich/json-pack-compression
json-pack compression
- Loading branch information
Showing
7 changed files
with
454 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import {Writer} from '../../util/buffers/Writer'; | ||
import {Encoder as SidecarEncoder} from '../codec/sidecar/binary/Encoder'; | ||
import {Decoder as SidecarDecoder} from '../codec/sidecar/binary/Decoder'; | ||
import {Encoder as StructuralEncoderCompact} from '../codec/structural/compact/Encoder'; | ||
import {Encoder as StructuralEncoderVerbose} from '../codec/structural/verbose/Encoder'; | ||
import {encode as encodeCompact} from '../../json-crdt-patch/codec/compact/encode'; | ||
import {encode as encodeVerbose} from '../../json-crdt-patch/codec/verbose/encode'; | ||
import {CborEncoder} from '../../json-pack/cbor/CborEncoder'; | ||
import {JsonEncoder} from '../../json-pack/json/JsonEncoder'; | ||
import type {FileOptions} from './File'; | ||
|
||
const writer = new Writer(4096); | ||
|
||
export const fileEncoders: FileOptions = { | ||
jsonEncoder: new JsonEncoder(writer), | ||
cborEncoder: new CborEncoder(writer), | ||
structuralCompactEncoder: new StructuralEncoderCompact(), | ||
structuralVerboseEncoder: new StructuralEncoderVerbose(), | ||
sidecarEncoder: new SidecarEncoder(), | ||
sidecarDecoder: new SidecarDecoder(), | ||
patchCompactEncoder: encodeCompact, | ||
patchVerboseEncoder: encodeVerbose, | ||
}; |
Oops, something went wrong.