You start with the least compressed version (ideally with the version with no compression done), and you throw more and more information away. For example,
H = uint8(Orig(1:2:end, :, :) + Orig(2:2:end, :, :))/2);
Q = uint8((H(:, 1:2:end, :) + H(:, 2:2:end, :))/2);
S = uint8((Q(1:2:end, 1:2:end, :) + Q(2:2:end, 2:2:end, :))/2);
H will be half of the original size, Q throws away half of that so it will be 1/4 of the original size, S throws away 3/4 of that so it will be 1/16 of the original size...