You are collecting data that may contain entropy, and you will need to output a fixedsize seed that is smaller than the input. That is, you have a lot of data that has a little bit of entropy, yet you need to produce a fixedsize seed for a pseudorandom number generator. At the same time, you would like to remove any statistical biases (patterns) that may be lingering in the data, to the extent possible.
Alternatively, you have data that you believe contains one bit of entropy per bit of data (which is generally a bad assumption to make, even if it comes from a hardware generator; see Recipe 11.19), but you'd like to remove any patterns in the data that could facilitate analysis if you're wrong about how much entropy is there. The process of removing patterns is called whitening.
You can use a cryptographic hash function such as SHA1 to process data into a fixedsize seed. It is generally a good idea to process data incrementally, so that you do not need to buffer potentially arbitrary amounts of data with entropy.

It is a good idea to use a cryptographic algorithm to compress the data from the entropy source into a seed of the right size. This helps preserve entropy in the data, up to the output size of the message digest function. If you need fewer bytes for a seed than the digest function produces, you can always truncate the output. In addition, cryptographic processing effectively removes any patterns in the data (assuming that the hash function is a pseudorandom function). Patterns in the data can help facilitate breaking an entropy source (in part or in full), particularly when that source does not actually produce as much entropy as was believed.
Most simpler compression methods are not going to do as good a job at preserving entropy. For example, suppose that your compression function is simply XOR. More concretely, suppose you need a 128bit seed, and you XOR data in 16byte chunks into a single buffer. Suppose also that you believe you have collected 128 bits of entropy from numerous calls to a 128bit timestamp operation.
In any particular timestamp function, all of the entropy is going to live in a few of the least significant bits. Now suppose that only two or three of those bits are likely to contain any entropy. The XOReverything strategy will leave well over 120 bits of the result trivial to guess. The remaining eight bits can be attacked via brute force. Therefore, even if the input had 128 bits of entropy, the XORbased compression algorithm destroyed most of the entropy.
SHA1 is good for these purposes. See Recipe 6.5 for how to use SHA1.
Recipe 6.5, Recipe 11.19