Have a basic logistics pipe sinking cobble connected to whatever autocrafter you want to use to compact the cobble, then have another basic logistics pipe (or a chassis pipe with an itemsink module) sinking compressed cobble connected to the barrel.
EDIT: Note, this won't compress any cobble...