SecureBlackbox Lite 2020 Kotlin Edition

Questions / Feedback?

BeforeCompressFile Event

Marks the start of compression of a file.

Syntax

public open class DefaultArchivewriterEventListener : ArchivewriterEventListener {
  ...
  public override fun beforeCompressFile(e: ArchivewriterBeforeCompressFileEvent) {}
  ...
}

public class ArchivewriterBeforeCompressFileEvent {
  val path: String?
  val fileSize: Long
  val dataSource: Int
}

Remarks

Subscribe to this event to be notified about the start of compression of an archive entry. The handler of this event is a good place to prepare the desired data source.

The Path parameter indicates the path to the extracted entry in the archive. The FileSize specifies the size of the file before compression. Use this event handler to adjust the data source if the file is to be loaded from a stream or buffer. The DataSource parameter indicates the type of the data media:

fdsFile (0)The data will be taken from a file indicated by the entry's LocalPath setting. You can change this path in the handler of this event.
fdsStream (1)The file data will be taken from a stream assigned to FileStream property.
fdsBuffer (2)The data will be taken from a buffer attached to the FileData property.

If passing the data from a stream or buffer, use AfterCompressFile to dispose of any objects allocated in this event handler (such as the source stream).

Use PrepareFile event to adjust the file data source on the fly.

Copyright (c) 2022 /n software inc. - All rights reserved.
SecureBlackbox Lite 2020 Kotlin Edition - Version 20.0 [Build 8063]