I think this might kill compression. Maybe it should rather add the previous value (to make sure it doesn't increase the number of bits required) and then the produced Long and Double values would need to check if the document has a value based on a bit set in order to know whether to return the value from this array or the default value?