The easiest methods are to write to AVAudioFile before converting to compressed, or to convert back to PCM buffer and write to AVAudioFile.
If the easy methods are not an option, I believe you are stuck using Audio File Services. You would use the AVAudioCompressedBuffer's AudioBufferList property's data pointer as a the inBuffer argument to AudioFileWriteBytes. Interacting with the C API can get ugly fast, but it's the only way to write straight data to an audio file, short of doing it manually.
let data = myAVAudioBufferlist.audioBufferList[0].mBuffers.mData