I saw that you could display the current byte offset in the statusline using %o, but I found no function or command which does the same.  Is there a way of getting the current byte offset pragmatically?
How to get the current byte offset in whole file
vimscript;binary file
Try this:function! FileOffset()    return line2byte(line('.')) + col('.') - 1endfunctionThis returns the 1-based offset in file, which is the same as %o in statusline.  You can, of course, subtract 1 to get the 0-based offset.