I do not know much about mp3 etc but I have developed a bit stream package which allows you to perform reads in terms of bits. I use these in my own compression/decompression test software. The spec is attached. I would be happy to send you the body as well if you are interested. Daniel Nilsson wrote: > > Hi. > In my mp3 decoder I will have to search for bit-patterns in a buffer of > bytes, how is this best done, and How can I "shift" in a sequence of bits > into a byte, or word efficiently? (I want ex. take 5 bits from a buffer and > put them rightadjusted in a unsigned_32) > > /Daniel Nilsson