You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fory.apache.org by "BsoBird (via GitHub)" <gi...@apache.org> on 2025/09/18 06:01:58 UTC
[I] [Question] compressString doesn't seem to reduce the size at all. [fory]
BsoBird opened a new issue, #2627:
URL: https://github.com/apache/fory/issues/2627
### Question
I enabled compressString, and I observed that the byte[] of the output book has not changed at all.
--
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] [Question] compressString doesn't seem to reduce the size at all. [fory]
Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang commented on issue #2627:
URL: https://github.com/apache/fory/issues/2627#issuecomment-3305670683
That's not what fory's work to compress pure asci/utf16 string. You can't compress it without perforamnce compromise. And nonf of serialization frameworks compress such strings. If you want smaller size, you can use [zstd](https://github.com/facebook/zstd) to compress fory serialized binary. zstd will detect the repeat and compress it.
--
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] [Question] compressString doesn't seem to reduce the size at all. [fory]
Posted by "BsoBird (via GitHub)" <gi...@apache.org>.
BsoBird commented on issue #2627:
URL: https://github.com/apache/fory/issues/2627#issuecomment-3305604903
So, what kind of string attributes can be compressed? Could you provide a demo?Tks!
--
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] [Question] compressString doesn't seem to reduce the size at all. [fory]
Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang commented on issue #2627:
URL: https://github.com/apache/fory/issues/2627#issuecomment-3305554569
If most of your string is ascii or latin1, the serialized size can be reduced anymore.
--
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] [Question] compressString doesn't seem to reduce the size at all. [fory]
Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang commented on issue #2627:
URL: https://github.com/apache/fory/issues/2627#issuecomment-3305617895
For example, string like `aaaaaaabbbbb😁` can be compressed.
--
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] [Question] compressString doesn't seem to reduce the size at all. [fory]
Posted by "BsoBird (via GitHub)" <gi...@apache.org>.
BsoBird commented on issue #2627:
URL: https://github.com/apache/fory/issues/2627#issuecomment-3305567416
```
private static class A{
public String id;
}
Fory fory = Fory.builder().withLanguage(Language.JAVA)
.withAsyncCompilation(true)
.withWriteNumUtf16BytesForUtf8Encoding(true)
.build();
Fory fory2 = Fory.builder().withLanguage(Language.JAVA)
.withAsyncCompilation(true)
.withStringCompressed(true)
.withNumberCompressed(true)
.withWriteNumUtf16BytesForUtf8Encoding(true)
.build();
fory.register(A.class);
fory2.register(A.class);
A data = new A();
data.id = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
A data1 = new A();
data1.id = data.id;
byte[] bytes = fory.serialize(data1);
byte[] bytes2 = fory2.serialize(data1);
System.out.println(Arrays.equals(bytes2, bytes)); // true
```
--
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] [Question] compressString doesn't seem to reduce the size at all. [fory]
Posted by "BsoBird (via GitHub)" <gi...@apache.org>.
BsoBird commented on issue #2627:
URL: https://github.com/apache/fory/issues/2627#issuecomment-3305568634
@chaokunyang
Is there any problem with my usage?
--
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] [Question] compressString doesn't seem to reduce the size at all. [fory]
Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang commented on issue #2627:
URL: https://github.com/apache/fory/issues/2627#issuecomment-3305596063
The usage is right. Like I said, the size can't be minimized anymore for ascii strings.
--
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] [Question] compressString doesn't seem to reduce the size at all. [fory]
Posted by "BsoBird (via GitHub)" <gi...@apache.org>.
BsoBird commented on issue #2627:
URL: https://github.com/apache/fory/issues/2627#issuecomment-3305649303
It's strange that neither AAAA alone nor 😁 alone can be compressed.
--
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] [Question] compressString doesn't seem to reduce the size at all. [fory]
Posted by "BsoBird (via GitHub)" <gi...@apache.org>.
BsoBird closed issue #2627: [Question] compressString doesn't seem to reduce the size at all.
URL: https://github.com/apache/fory/issues/2627
--
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] [Question] compressString doesn't seem to reduce the size at all. [fory]
Posted by "BsoBird (via GitHub)" <gi...@apache.org>.
BsoBird commented on issue #2627:
URL: https://github.com/apache/fory/issues/2627#issuecomment-3305673580
I see. Tks.
--
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