Any deterministic function that does one-to-one and on-to mappings, and makes at least one input shorter to represent on output by at least one bit, is a lossless compression algorithm.
The one-to-one and on-to means that a given input always becomes the same output and that no two different inputs become the same output.
There are an endless number of lossless compression algorithms.
The trick for lossless compression algorithms is finding one that compresses well on a "useful" set of data. A great algorithm for jackhammer noise might not be good for speech or classical music. It would be reasonable to expect that if you had ultrasound recordings of bats then you might want a different algorithm than for that