---
id: object/codeunit/425
type: object
title: Codeunit 425 "Data Compression"
summary: Codeunit 425 "Data Compression" in System Application (System.IO). 17 public procedures. Present since at least BC23, still in BC30, changed in BC26.
tier: official
language: en
tags:
  - codeunit
  - system application
versions:
  introduced: null
  last_changed: "26"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: dbc5ca4ba8bd59c74d6fd653de28a70caec8bbd4a930ed1cc4af720018654008
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/Data%20Compression/src/DataCompression.Codeunit.al
    title: src/System Application/App/Data Compression/src/DataCompression.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 425
name: Data Compression
namespace: System.IO
app: System Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "26"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 17
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 1
  called_by: 20
  implements: 0
---

# Codeunit 425 "Data Compression"

> Codeunit 425 "Data Compression" in System Application (System.IO). 17 public procedures. Present since at least BC23, still in BC30, changed in BC26.

System Application · System.IO · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/Data%20Compression/src/DataCompression.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Access | Public |

## Procedures

- `CreateZipArchive()`: Creates a new ZipArchive instance.
- `OpenZipArchive(InputInStream: InStream; OpenForUpdate: Boolean)`: Creates a ZipArchive instance from the given InStream.
- `OpenZipArchive(InputInStream: InStream; OpenForUpdate: Boolean; EncodingCodePageNumber: Integer)`: Creates a ZipArchive instance from the given InStream.
- `OpenZipArchive(TempBlob: Codeunit "Temp Blob"; OpenForUpdate: Boolean)`: Creates a ZipArchive instance from the given instance of Temp Blob codeunit.
- `SaveZipArchive(OutputOutStream: OutStream)`: Saves the ZipArchive to the given OutStream.
- `SaveZipArchive(var TempBlob: Codeunit "Temp Blob")`: Saves the ZipArchive to the given instance of Temp Blob codeunit.
- `CloseZipArchive()`: Disposes the ZipArchive.
- `GetEntryList(var EntryList: List of [Text])`: Returns the list of entries for the ZipArchive.
- `ExtractEntry(EntryName: Text; OutputOutStream: OutStream; var EntryLength: Integer)` (obsolete 23.0: This function has been replaced by the function ExtractEntry(EntryName: Text; OutputOutStream: OutStream) which instead returns the entry length.): Extracts an entry from the ZipArchive.
- `ExtractEntry(EntryName: Text; OutputOutStream: OutStream): Integer`: Extracts an entry from the ZipArchive.
- `ExtractEntry(EntryName: Text; var TempBlob: Codeunit "Temp Blob"): Integer`: Extracts an entry from the ZipArchive to a TempBlob instance.
- `AddEntry(InStreamToAdd: InStream; PathInArchive: Text)`: Adds an entry to the ZipArchive.
- `RemoveEntry(PathInArchive: Text)`: Removes an entry from the ZipArchive.
- `IsGZip(InStream: InStream): Boolean`: Determines whether the given InStream is compressed with GZip.
- `IsZip(InStream: InStream): Boolean`: Determines whether the given InStream is compressed with Zip.
- `GZipCompress(InputInStream: InStream; CompressedOutStream: OutStream)`: Compresses a stream with GZip algorithm. The InStream that contains the content that should be compressed. The OutStream into which the compressed stream is copied to.
- `GZipDecompress(InputInStream: InStream; DecompressedOutStream: OutStream)`: Decompresses a GZipStream. The InStream that contains the content that should be decompressed. The OutStream into which the decompressed stream is copied to.

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 421 "Data Compression Impl."](../codeunit/421.md) (12 calls: `AddEntry → AddEntry`, `CloseZipArchive → CloseZipArchive`, `CreateZipArchive → CreateZipArchive`, …)

## Called by

- [Codeunit 9988 "Word Template Impl."](../codeunit/9988.md) (14 calls: `GenerateSpreadsheetDataSource → AddEntry`, `GetFileFromZip → ExtractEntry`, `GetFileFromZip → GetEntryList`, …)
- [Codeunit 5261 "Audit File Export Mgt."](../codeunit/5261.md) (8 calls: `GenerateSingleZipFileForAllLines → AddEntry`, `GenerateSingleZipFileForAllLines → CloseZipArchive`, `GenerateSingleZipFileForAllLines → CreateZipArchive`, …)
- [Codeunit 1652 "Add-in Manifest Management"](../codeunit/1652.md) (4 calls: `DownloadMultipleManifestsToClient → AddEntry`, `DownloadMultipleManifestsToClient → CloseZipArchive`, `DownloadMultipleManifestsToClient → CreateZipArchive`, …)
- [Codeunit 4308 "Agent Message Impl."](../codeunit/4308.md) (4 calls: `DownloadAttachments → AddEntry`, `DownloadAttachments → CloseZipArchive`, `DownloadAttachments → CreateZipArchive`, …)
- [Codeunit 431 "IC Outbox Export"](../codeunit/431.md) (4 calls: `DownloadBatchFiles → AddEntry`, `DownloadBatchFiles → CloseZipArchive`, `DownloadBatchFiles → CreateZipArchive`, …)
- [Codeunit 4352 "Custom Agent Instructions"](../codeunit/4352.md) (4 calls: `DownloadMultipleInstructions → AddEntry`, `DownloadMultipleInstructions → CloseZipArchive`, `DownloadMultipleInstructions → CreateZipArchive`, …)
- [Codeunit 452 "Report Distribution Management"](../codeunit/452.md) (4 calls: `CreateOrAppendZipFile → AddEntry`, `CreateOrAppendZipFile → CreateZipArchive`, `CreateOrAppendZipFile → IsGZip`, …)
- [Codeunit 4810 "IntrastatReportManagement"](../codeunit/4810.md) (4 calls: `ExportToZip → AddEntry`, `ExportToZip → CloseZipArchive`, `ExportToZip → CreateZipArchive`, …)
- [Codeunit 5069 "Word Template Interactions"](../codeunit/5069.md) (4 calls: `EnableZipArchive → CreateZipArchive`, `Merge → CloseZipArchive`, `Merge → SaveZipArchive`, …)
- [Codeunit 8800 "Custom Layout Reporting"](../codeunit/8800.md) (4 calls: `AddFileToClientZip → CreateZipArchive`, `ProcessReport → AddEntry`, `ProcessReport → CloseZipArchive`, …)
- [Codeunit 8906 "Email Editor"](../codeunit/8906.md) (4 calls: `DownloadAttachments → AddEntry`, `DownloadAttachments → CloseZipArchive`, `DownloadAttachments → CreateZipArchive`, …)
- [Codeunit 9520 "Mail Management"](../codeunit/9520.md) (4 calls: `DownloadPdfAttachment → AddEntry`, `DownloadPdfAttachment → CloseZipArchive`, `DownloadPdfAttachment → CreateZipArchive`, …)
- [Table 1173 "Document Attachment"](../table/1173.md) (4 calls: `DownloadZipFileWithVATReturnAttachments → AddEntry`, `DownloadZipFileWithVATReturnAttachments → CloseZipArchive`, `DownloadZipFileWithVATReturnAttachments → CreateZipArchive`, …)
- [Table 31 "Item Picture Buffer"](../table/31.md) (4 calls: `LoadZIPFile → CloseZipArchive`, `LoadZIPFile → ExtractEntry`, `LoadZIPFile → GetEntryList`, …)
- [Table 60 "Document Sending Profile"](../table/60.md) (4 calls: `SaveZipArchiveToBLOB → CloseZipArchive`, `SaveZipArchiveToBLOB → SaveZipArchive`, `SendToEMail → SaveZipArchive`, …)
- [Table 61 "Electronic Document Format"](../table/61.md) (4 calls: `SendElectronically → AddEntry`, `SendElectronically → CloseZipArchive`, `SendElectronically → CreateZipArchive`, …)
- [Table 747 "VAT Report Archive"](../table/747.md) (4 calls: `DownloadZipFile → AddEntry`, `DownloadZipFile → CloseZipArchive`, `DownloadZipFile → CreateZipArchive`, …)
- [Page 9802 "Permission Sets"](../page/9802.md) (3 calls: `ExportMixedPermissionSets → AddEntry`, `ExportMixedPermissionSets → CreateZipArchive`, `ExportMixedPermissionSets → SaveZipArchive`)
- [Table 77 "Report Selections"](../table/77.md) (2 calls: `SendToZipForCust → AddEntry`, `SendToZipForVend → AddEntry`)
- [Codeunit 8619 "Config. Pckg. Compression Mgt."](../codeunit/8619.md) (1 call: `ServersideDecompress → IsGZip`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC26

## Deprecations

- procedure ExtractEntry: Pending 23.0 (#if not CLEAN26), "This function has been replaced by the function ExtractEntry(EntryName: Text; OutputOutStream: OutStream) which instead returns the entry length."

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "Data Compression")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
