How is loop information encoded in FLAC files?
The simple answer is, &quot;the same way it's kept in .wav files.&quot;  FLAC uses the same RIFF &quot;chunk&quot; structure as WAV.  The WAV file format has a chunk for use by samplers, which includes looping information.  I found I could simply copy that chunk from the WAV file and append it to the FLAC file and it worked (for anything that supported loops in FLAC files, which isn't everything -- for example linuxsampler does not, due to a library it uses not supporting it yet.)
Better yet, the flac application has a --keep-foreign-metadata option that does the trick without my having to code anything.