Friday, February 2, 2018

Compress data with ABAP (ZIP, GZIP)

    DATA lv_string TYPE string.
    DATA lv_xstring TYPE xstring.


    " gzip 
    cl_abap_gzip=>compress_text(
      EXPORTING text_in  lv_string
      IMPORTING gzip_out lv_xstring
    ).



    " unzip 
    cl_abap_gzip=>decompress_text(
      EXPORTING gzip_in  lv_xstring
      IMPORTING text_out lv_string
    ).



See also methods COMPRESS_BINARY and DECOMPRESS_BINARY of cl_abap_gzip.

No comments:

Post a Comment

Working with the session Id // ID für den Modus

Sometimes it can be helpful to know the id of the current session     CALL FUNCTION 'TH_GET_CONTEXT_ID'       IMPORTING         cont...