refactor: extract SimplePacketCodec