virpalacios Active Member Licensed User Longtime User May 26, 2024 #1 Hi All, Hope you are doing fine, thanks for any comments about this issue I the past, I was able to get a compress json from a php script, in BA4 I have to use: Code: json_descomprimido = descompresor_gs.DecompressBytes(Bit.InputStreamToBytes(job.GetInputStream),"zlib") resultstring = BytesToString(json_descomprimido,0, json_descomprimido.Length, "UTF8") Now I have to do an inverse process, I have to compress a Big Json String in B4A and sending it to a php script I am planning using CompressBytes(Data() as Byte, CompressMethod() as String) as Byte() in the php script I want to use gzuncompress. My Doubts are: a) Do I have to convert my json string to a Bytes Array before use CompressBytes? b) If so after getting compressed Byte() array , do I have to convert it to a inputstream or another format before sending to php script? Thanks in Advance!!! Best Regards
Hi All, Hope you are doing fine, thanks for any comments about this issue I the past, I was able to get a compress json from a php script, in BA4 I have to use: Code: json_descomprimido = descompresor_gs.DecompressBytes(Bit.InputStreamToBytes(job.GetInputStream),"zlib") resultstring = BytesToString(json_descomprimido,0, json_descomprimido.Length, "UTF8") Now I have to do an inverse process, I have to compress a Big Json String in B4A and sending it to a php script I am planning using CompressBytes(Data() as Byte, CompressMethod() as String) as Byte() in the php script I want to use gzuncompress. My Doubts are: a) Do I have to convert my json string to a Bytes Array before use CompressBytes? b) If so after getting compressed Byte() array , do I have to convert it to a inputstream or another format before sending to php script? Thanks in Advance!!! Best Regards
Erel B4X founder Staff member Licensed User Longtime User May 26, 2024 #2 a) yes. String.GetBytes. b) no. Upvote 0
virpalacios Active Member Licensed User Longtime User May 27, 2024 #3 Erel said: a) yes. String.GetBytes. b) no. Click to expand... Hi Erel, Thanks a lot for your answer, Best Regards Greetings ?? Upvote 0
Erel said: a) yes. String.GetBytes. b) no. Click to expand... Hi Erel, Thanks a lot for your answer, Best Regards Greetings ??