Patent attributes
There is provided a computer-implemented method of compressing a baseline dataset, comprising: creating a weight function that calculates a weight for each instance of each unique data elements in the baseline dataset, as a function of sequential locations of each of the instances of each respective unique data element within the baseline dataset, creating an output dataset storing a codeword for each one of the unique data elements, wherein codewords are according to a compression rule defining data elements associated with a relatively higher weight as being associated with codewords that are relatively shorter, dynamically creating the compressed dataset by sequentially iterating, for each current sequential location of the baseline dataset: determining an encoded data element mapped to the respective data element of the current sequential location according to the weight function, and adjusting the codewords of the output dataset according to the current weights to maintain the compression rule.