Is it safe to use aluminium seatpost adapter (27.2mm to 31.6mm) for a carbon frame? I have Cane Creek Thudbuster Seastpost (aluminium) 27.2mm x 400mm which i want to use for a bike with a carbon frame (31.6mm seat-tube).

I'm thinking about getting a seatpost adapter/shim from 27.2mm to 31.6mm, but I'm not sure if that's not going to damage the carbon frame. Shim itself is ~80mm in length.

Is it safe to use?
80 mm length should be long enough to provide stable and good grip. Do make sure to use carbon mounting paste, of course, wiping any traces of grease (if they exist) off the adapter and the seatpost. If the seatpost stick long above the frame and if it's an off road bike, I might consider it a tad bit risky move. Otherwise, you should be fine.

And, like the previous poster said, to occasionally check for traces of galvanic corrosion. You don't want the seatpost stuck to the frame.