How long it takes for an animal to decompose depends on a variety of variables. The most important thing when it comes to decomposing bodies is the weather.
The weather plays a huge role in animal decomposition because it dictates what other living organisms are in the area. If it is very cold, then insects and bacteria aren't around to decompose it and the cold has preservative qualities. On the other hand, if it is extremely hot then it may be too hot for certain insects. However, when it is a moderately warm temperature then insects such as flies and beetles thrive, allowing them to begin breaking down the dead animal.