Compressing a time-domain signal in the frequency domain Matlab
Everything depends on what you call compressing. What you are proposing is Fourier or spectrum thresholding. You will generate a $50$-length vector with some zeroes, hopefully. Let us ignore "complexness" that requires two floats for now,  you can deal with it using Hermitian symmetry. 

Your main problem is actual compression. Forget about quantization first. The main issue is index location. Assume I have a transformed domain vector $T=[5, 1, 3 ,4, 0.5]$. Suppose I use a threshold on $2$. Now I give you the compressed version  $T_c=[5,  3 ,4]$, a ratio of $3/5$. 

Can you retrieve $T_d=[5, 0, 3 ,4, 0]$? Probably not, you do not know where the zeroes were. This problem somehow prevented matching pursuit to be used for image compression, because coding the index penalized the final compressed file too much.