g encoded using the specified encoding
  - a bytes or a buffer object
  - any object implementing the buffer API.
  - an integer