Note: this project is still very much a "work-in-progress".
We need your help to ensure that the keyword list is complete.
If you are using the
Deltaformat and want to help with
/lib/index.js#L4and confirm all the keywords are there.
If you find a keyword in
Deltathat isn't in the
please leave a comment on: deltamin/issues/1
The Delta format https://quilljs.com/docs/delta is quite verbose:
const delta =insert: 'Gandalf' attributes: bold: trueinsert: ' the 'insert: 'Grey' attributes: color: '#ccc';
From the Developer perspective, having a verbose format makes perfect sense because it's easy to understand at a glance what is going on. Given that computers are more than fast enough to process this verbose format, it won't affect the performance of any app using the Delta format.
Where we feel there is scope for improvement is in: a) data transmission i.e. saving bandwidth for people who don't have a lot of it b) saving complete history of changes so that they can be replayed
We can minify this to:
const delta =i: 'Gandalf' a: b: truei: ' the 'i: 'Grey' a: c: '#ccc';
(157 - 117 / 157) = 25% bandwidth saving.
It might not feel like much of a saving in this trivial example,
but if you scale it up to entire documents
and thousands (millions?) of concurrent people using a collaborative editor,
a 25% saving on a $10k/month bandwidth bill is $30k/year!
Saving bandwidth is the right thing to do for the World!
Why should anyone needlessly waste any scarce resource?
Obviously this is micro-bandwidth saving is meaningless
in a world where
is server-rendering and streaming 4K games in realtime ... 🤦
But we can only try to set a good example to follow.
node.js dependency in your project:
npm install deltamin --save
Use it before sending the data to the server:
const deltamin = ;const data = deltamin;channel;
Note: this example is for sending data via a Phoenix Channel.
You can help us finish this module
by going through the Delta spec and add all keywords to the
- Define short versions for all the keywords
- Make the minified keywords as short as possible (that's the whole point of this project!)
- wherever there is a keyword that starts with the same character,
give priority to the keyword that appears most frequently in the format.
insertis used more often than
- Add more examples to