- decode逻辑总结

- 抽取公共部分

- 概念代码
while (true) {
if (!in.isReadable()) {
break;
}
byte first = in.readByte();
switch (first) {
case '*':
case '+':
case '-':
case ':': {
ByteBuf buf = findSliceRead(in,processor);
if (null != buf) {
out.add(buf.toString(StandardCharsets.UTF_8));
}
}
break;
case '$': {
ByteBuf buf = findSliceRead(in,processor);
lastLen = Integer.parseInt(buf.toString(StandardCharsets.UTF_8));
out.add(lastLen);
ByteBuf buf1 = sliceRead(in,lastLen);
out.add(buf1.toString(StandardCharsets.UTF_8));
}
break;
default:
break;
}
}