[#DifferenceFormatter] = DifferenceFormatter :mrdocs: Formatter that (de)serializes a monotonically increasing sequence as differences. == Synopsis Declared in `<blockencodings.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class DifferenceFormatter; ---- == Description Successive values are encoded as the gap from the previous value, so a sorted list of indexes stays compact on the wire. == Member Functions [cols="1,4"] |=== | Name| Description | xref:DifferenceFormatter/Ser.adoc[`Ser`] | Writes the next value as its difference from the previous one. | xref:DifferenceFormatter/Unser.adoc[`Unser`] | Reads the next value by adding the encoded difference to the running total. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#