Skip to content

Commit 40c0260

Browse files
fixup! EDU-2000: Adds vcdiff to JS delta docs
1 parent 9de02cc commit 40c0260

1 file changed

Lines changed: 10 additions & 14 deletions

File tree

content/channels/options/deltas.textile

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ blang[javascript,nodejs].
4848

4949
h2(#vcdiff). Install vcdiff decoder
5050

51-
A Vcdiff decoder written in pure JavaScript. The vcdiff decoder is a JavaScript library that decodes delta-compressed messages, allowing clients to reconstruct full messages from the small "diffs" sent by Ably to reduce bandwidth usage.
51+
The vcdiff decoder is written in pure JavaScript and enables clients to reconstruct full messages from the small "diffs" sent by Ably.
5252

5353
h3(#install). Installation from npm for Node.js
5454

@@ -74,6 +74,15 @@ blang[javascript,nodejs].
7474
<script src="https://cdn.ably.io/lib/vcdiff-decoder.min-1.js"></script>
7575
```
7676

77+
h3(#exported). Exported functions
78+
79+
The vcdiff decoder library exports the following function for manual delta decoding.
80+
81+
@decode(delta, source)@ applies a vcdiff delta to a source message to return a "@Uint8Array@":https://nodejs.org/api/buffer.html#buffer containing the target message:
82+
83+
* @delta@: The binary delta/diff data.
84+
* @source@: The original message to apply the delta to.
85+
7786
blang[default].
7887

7988
h2(#subscribe). Subscribe using delta
@@ -167,19 +176,6 @@ channel.Subscribe(message => {
167176
});
168177
```
169178

170-
blang[javascript,nodejs].
171-
172-
h3(#exported). Exported functions
173-
174-
The vcdiff decoder library exports the following function for manual delta decoding.
175-
176-
@decode(delta, source)@ applies a vcdiff delta to a source message to return a "@Uint8Array@":https://nodejs.org/api/buffer.html#buffer containing the target message:
177-
178-
* @delta@: The binary delta/diff data.
179-
* @source@: The original message to apply the delta to.
180-
181-
blang[default].
182-
183179
h2(#limitations). Known limitations
184180

185181
In principle, @vcdiff@ deltas can be applied to encrypted message payloads, but in practice this provides no benefit because there is no similarity between successive encrypted payloads even for identical or near-identical plaintext message payloads.

0 commit comments

Comments
 (0)