This is simple implementation of the decoding part of RFC 2646, also known as format=flowed.
The code is available from here and inlined below.
It has been integrated with Gnus, which is distributed via the Gnus towers.