I have a (time series) data that looks like {21,21,22,23,24,23,....} and I'm trying to implement the jpeg algorithm in JAVA to see how the jpeg compression works on such 1D data (my plan is to compare all sorts of compression algorithms).
I know that using JPEG on text data (or in general lossy compression in text data) doesn't make much sense but my goal is to see what kind of intermediate patterns are generated (e.g. "automobile" becomes "qwses")and how much of that intermediate pattern resembles the original words over increasing compression rate. So the idea is something like this: https://www.youtube.com/watch?v=meovx9OqWJc&t=1s
My input file, as I said above, is a 1x458 matrix and contains numbers between 10 and 300; e.g. {10, 13, 14, 14, 15, 12, ...., 247,247,249,.., 284, 283}
My main problem is that I am not quite sure how I should theoretically convert the JPEG algorithm (8x8 image multiplied with 8x8 DCT coefficient matrix etc is adapted for a 1xN data (a line) and what part of the implementation should I change in JPEG (e.g. how should I have dct coefficients for such data, etc.)? If someone can explain it with a pseudo code, that would also be really nice.