2013 May 17 10:06 AM
Hi Experts,
does anyone of you has experience with the optional compression level parameter? I have compressed several xstrings with different length but all compression levels from 1-9 result in the same file size for each xstring. It is like the parameter is not used by the routine. Maybe there are changes in newer Netweaver releases but as I can tell from NW 6.20 (4.7) and 7.00 this parameter does not change the compression level resp. the file size.
Regards Sebastian
Hi Experts,
does anyone of you has experience with the optional compression level parameter? I have compressed several xstrings with different length but all compression levels from 1-9 result in the same file size for each xstring. It is like the parameter is not used by the routine. Maybe there are changes in newer Netweaver releases but as I can tell from NW 6.20 (4.7) and 7.00 this parameter does not change the compression level resp. the file size.
Regards Sebastian
2013 May 17 11:21 AM
Hi,
I think the compression levels wont matter much if then data is small and also if data cannot be compressed any further.
Cheers,
Arindam
2013 May 17 11:37 AM
Hello Sebastian,
It is like the parameter is not used by the routineThis method uses the Kernel magic wand (read: method) ab_compressBinary. So there is no way us ABAPers can influence it in any way rather than thinking & speculating
BR,
Suhas
2013 May 17 12:40 PM
Hi Sebastian,
According to method documentation (believe or not, Suhas, there's documentation!!!), compression level has more to do with speed than size:
- COMPRESS_LEVEL
- Optional specification of the compression level. This must be between 0 and 9, where 1 is the fastest and 9 the highest compression. 0 means that no compression takes place. The deafult value is 6.
To read full method doco, place cursor in a method and click on documentation icon:
Regards,
Custodio
@zcust01
2013 May 17 12:49 PM
According to method documentation (believe or not, Suhas, there's documentation!!!), compression level has more to do with speed than size:Hey Custodio,
SAP documentation is the first thing i check before using any method/function May be in this case we interpreted the documentation in different ways -
This must be between 0 and 9, where 1 is the fastest and 9 the highest compression.I think that 1 is the fastest (& the lowest) compression with 9 being the highest compression (& the slowest) . Try to add a file to any ZIP archive (using WinZip, WinRAR et al.) you'll see the compression level from the Fastest ---> Highest.
Happy to hear your comments.
BR,
Suhas
2013 May 17 12:56 PM
Hi Suhas,
Not saying you don't check it, just sometimes we (at least I) forget to check individual methods doco and read only the class doco.
Anyway, I think you are right, I probably misinterpreted the doco.
Cheers,
Custodio
2013 May 17 1:09 PM
That was exactly my expectation when I was reading the documentation in the first place. In fact the documentation tells something about speed and compression BUT if I create a simple report and run this method with all numbers from 0 to 9 (even 0 compresses!) then the runtime and compression rate is the same for all 10 variations. Even if I vary the xstring input between large and mid size binarys there is no difference. I think that compression level is just a placeholder and SAP did not implement this feature in its kernel yet 😕
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |