function output = compress(data)
l = length(data);
level = round(l*0.999);
X = dct(data);
[XX,ind] = sort(abs(X),'descend');
        a = X(:,1);
        b = X(:,2);
        inda = ind(:,1);
        indb = ind(:,2);
        a(inda(level+1:end)) = 0;
        b(indb(level+1:end)) = 0;
        X(:,1) = a;
        X(:,2) = b;
  output = idct(X);
end

