'Parse a stylesheet from a byte string.
The character encoding is determined from the passed metadata and the
``@charset`` rule in the stylesheet (if any).
If no encoding information is available or decoding fails,
decoding defaults to UTF-8 and then fall back on ISO-8859-1.
:param css_bytes:
A CSS stylesheet as a byte string.
:param protocol_encoding:
The "charset" parameter of a "Content-Type" HTTP header (if any),
or similar metadata for other protocols.
:param linking_encoding:
``<link charset="">`` or other metadata from the linking mechanism
(if any)
:param document_encoding:
Encoding of the referring style sheet or document (if any)
:return:
A :class:`Stylesheet`.'

def parse_stylesheet_bytes(self, css_bytes, protocol_encoding=None, linking_encoding=None, document_encoding=None):

    (css_unicode, encoding) = decode(css_bytes, protocol_encoding, linking_encoding, document_encoding)
    return self.parse_stylesheet(css_unicode, encoding=encoding)
