:param bool t: whether this string is a huffman compressed string. :param str s: the string to parse. :return: HPackStringsInterface: either a HPackLiteralString or HPackZString, depending on t. # noqa: E501 :raises: InvalidEncodingException
(t, s)
| 1210 | |
| 1211 | @staticmethod |
| 1212 | def _parse(t, s): |
| 1213 | # type: (bool, str) -> HPackStringsInterface |
| 1214 | """ |
| 1215 | :param bool t: whether this string is a huffman compressed string. |
| 1216 | :param str s: the string to parse. |
| 1217 | :return: HPackStringsInterface: either a HPackLiteralString or HPackZString, depending on t. # noqa: E501 |
| 1218 | :raises: InvalidEncodingException |
| 1219 | """ |
| 1220 | if t: |
| 1221 | i, ibl = HPackZString.huffman_conv2bitstring(s) |
| 1222 | return HPackZString(HPackZString.huffman_decode(i, ibl)) |
| 1223 | return HPackLiteralString(s) |
| 1224 | |
| 1225 | def getfield(self, pkt, s): |
| 1226 | # type: (packet.Packet, str) -> Tuple[str, HPackStringsInterface] |
no test coverage detected