You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fory.apache.org by "martin-1120 (via GitHub)" <gi...@apache.org> on 2026/05/07 06:45:30 UTC

[I] 如何判断bytes 是否经过fory序列化? [fory]

martin-1120 opened a new issue, #3651:
URL: https://github.com/apache/fory/issues/3651

   ### Question
   
   redis 使用fory序列化, get时 如果是increment的值,没有经过fory序列化,再序列化会报错,因此需要判断get出来的bytes是否经过 fory序列化
   有什么方法吗?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org


Re: [I] 如何判断bytes 是否经过fory序列化? [fory]

Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang commented on issue #3651:
URL: https://github.com/apache/fory/issues/3651#issuecomment-4395728658

   你单独加一个标志位在前面呢?这个看上去不是Fory的问题


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org


Re: [I] 如何判断bytes 是否经过fory序列化? [fory]

Posted by "martin-1120 (via GitHub)" <gi...@apache.org>.
martin-1120 commented on issue #3651:
URL: https://github.com/apache/fory/issues/3651#issuecomment-4395863881

   好吧


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org


Re: [I] 如何判断bytes 是否经过fory序列化? [fory]

Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang commented on issue #3651:
URL: https://github.com/apache/fory/issues/3651#issuecomment-4395672008

   没太理解,你说的 `increment的值,没有经过fory序列化,再序列化会报错`,这个increment 是啥意思


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org


Re: [I] 如何判断bytes 是否经过fory序列化? [fory]

Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang commented on issue #3651:
URL: https://github.com/apache/fory/issues/3651#issuecomment-4395751403

   你自己的代码加标志位,不是给Fory加标志位,你自己的数据前面加一个header


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org


Re: [I] 如何判断bytes 是否经过fory序列化? [fory]

Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang commented on issue #3651:
URL: https://github.com/apache/fory/issues/3651#issuecomment-4395769617

   没有,也不可靠


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org


Re: [I] 如何判断bytes 是否经过fory序列化? [fory]

Posted by "martin-1120 (via GitHub)" <gi...@apache.org>.
martin-1120 commented on issue #3651:
URL: https://github.com/apache/fory/issues/3651#issuecomment-4395761403

    没有默认的特征么 比如第一个字节固定是个什么值


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org


Re: [I] 如何判断bytes 是否经过fory序列化? [fory]

Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang commented on issue #3651:
URL: https://github.com/apache/fory/issues/3651#issuecomment-4395805125

   新版本已经去掉了


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org


Re: [I] 如何判断bytes 是否经过fory序列化? [fory]

Posted by "martin-1120 (via GitHub)" <gi...@apache.org>.
martin-1120 commented on issue #3651:
URL: https://github.com/apache/fory/issues/3651#issuecomment-4395716496

   redis有个 increment自增方法, 
   反正就是 redis里我存储 基础类型 String Long Integer 之类的,对象类型用fory序列化, 我通过redis get出来就是bytes ,我需要知道 这bytess是否是经过forxy序列化


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org


Re: [I] 如何判断bytes 是否经过fory序列化? [fory]

Posted by "martin-1120 (via GitHub)" <gi...@apache.org>.
martin-1120 commented on issue #3651:
URL: https://github.com/apache/fory/issues/3651#issuecomment-4395794490

   这个不靠谱吗?
   <img width="1114" height="778" alt="Image" src="https://github.com/user-attachments/assets/8d5f5ccc-fb2f-4847-9c84-ec650195c332" />


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org


Re: [I] 如何判断bytes 是否经过fory序列化? [fory]

Posted by "martin-1120 (via GitHub)" <gi...@apache.org>.
martin-1120 commented on issue #3651:
URL: https://github.com/apache/fory/issues/3651#issuecomment-4395730602

   总之就是我需要知道一个byte数组,是否是经过forxy序列化,  AI给出了个方法,但是我不知道是否靠谱
   public static boolean isFurySerialized(byte[] data) {
       if (data == null || data.length < 2) {
           return false;
       }
       // Fury的魔数 (Magic Number) 是小端序的 0xD462,实际表现为字节数组 {0x62, 0xD4}
       return (data[0] == 0x62 && data[1] == (byte) 0xD4);
   }


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org


Re: [I] 如何判断bytes 是否经过fory序列化? [fory]

Posted by "martin-1120 (via GitHub)" <gi...@apache.org>.
martin-1120 commented on issue #3651:
URL: https://github.com/apache/fory/issues/3651#issuecomment-4395733528

   可以自定义标志位是吗? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org


Re: [I] 如何判断bytes 是否经过fory序列化? [fory]

Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang closed issue #3651: 如何判断bytes 是否经过fory序列化?
URL: https://github.com/apache/fory/issues/3651


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org