github.com/Jeffail/benthos/v3@v3.65.0/website/docs/components/processors/compress.md (about)

     1  ---
     2  title: compress
     3  type: processor
     4  status: stable
     5  categories: ["Parsing"]
     6  ---
     7  
     8  <!--
     9       THIS FILE IS AUTOGENERATED!
    10  
    11       To make changes please edit the contents of:
    12       lib/processor/compress.go
    13  -->
    14  
    15  import Tabs from '@theme/Tabs';
    16  import TabItem from '@theme/TabItem';
    17  
    18  
    19  Compresses messages according to the selected algorithm. Supported compression
    20  algorithms are: gzip, zlib, flate, snappy, lz4.
    21  
    22  
    23  <Tabs defaultValue="common" values={[
    24    { label: 'Common', value: 'common', },
    25    { label: 'Advanced', value: 'advanced', },
    26  ]}>
    27  
    28  <TabItem value="common">
    29  
    30  ```yaml
    31  # Common config fields, showing default values
    32  label: ""
    33  compress:
    34    algorithm: gzip
    35    level: -1
    36  ```
    37  
    38  </TabItem>
    39  <TabItem value="advanced">
    40  
    41  ```yaml
    42  # All config fields, showing default values
    43  label: ""
    44  compress:
    45    algorithm: gzip
    46    level: -1
    47    parts: []
    48  ```
    49  
    50  </TabItem>
    51  </Tabs>
    52  
    53  The 'level' field might not apply to all algorithms.
    54  
    55  ## Fields
    56  
    57  ### `algorithm`
    58  
    59  The compression algorithm to use.
    60  
    61  
    62  Type: `string`  
    63  Default: `"gzip"`  
    64  Options: `gzip`, `zlib`, `flate`, `snappy`, `lz4`.
    65  
    66  ### `level`
    67  
    68  The level of compression to use. May not be applicable to all algorithms.
    69  
    70  
    71  Type: `int`  
    72  Default: `-1`  
    73  
    74  ### `parts`
    75  
    76  An optional array of message indexes of a batch that the processor should apply to.
    77  If left empty all messages are processed. This field is only applicable when
    78  batching messages [at the input level](/docs/configuration/batching).
    79  
    80  Indexes can be negative, and if so the part will be selected from the end
    81  counting backwards starting from -1.
    82  
    83  
    84  Type: `array`  
    85  Default: `[]`  
    86  
    87