code: def _decode_signature(self, signature):
          
  
          sig = a2b_base64(signature)
          if len(sig) != 65:
              raise EncodingError("Wrong length, expected 65")
  
          # split into the parts.
          first = byte2int(sig)
          r = from_bytes_32(sig[1:33])
          s = from_bytes_32(sig[33:33+32])
  
          # first byte encodes a bits we need to know about the point used in signature
          if not (27 <= first < 35):
              raise EncodingError("First byte out of range")
  
          # NOTE: The first byte encodes the "recovery id", or "recid" which is a 3-bit values
          # which selects compressed/not-compressed and one of 4 possible public pairs.
          #
          first -= 27
          is_compressed = bool(first & 0x4)
  
          return is_compressed, (first & 0x3), r, s
docs: Decode the internal fields of the base64-encoded signature.