# cp.nib.archiver

Provides support for loading NIB files stored in the NIBArchive format.

# API Overview

Constants - Useful values which cannot be changed


Functions - API calls offered directly by the extension

  • isSupported

Constructors - API calls which return an object, typically one that offers API methods

  • new

Methods - API calls which can only be made on an object returned by a constructor

  • fromFile

# API Documentation

# Constants


Signature cp.nib.archiver.SIGNATURE -> string
Type Constant
Description Marks the data stream as an NIBArchive.
Notes None
Source src/extensions/cp/nib/archiver.lua line 324

# Functions

# isSupported

Signature cp.nib.archiver.isSupported(data) -> boolean
Type Function
Description Checks if the given data is an NIBArchive.
  • data - The data to check.
  • true if the data is an NIBArchive, false otherwise.
Notes None
Examples None
Source src/extensions/cp/nib/archiver.lua line 329

# Constructors

# new

Signature cp.nib.archiver.new(decoders) -> cp.nib.archiver
Type Constructor
Description Creates a new cp.nib.archiver instance, with the specified list of decoders.
  • decoders - The list of cp.nib.decoder functions to use.
  • The new cp.nib.archiver instance.
Notes None
Examples None
Source src/extensions/cp/nib/archiver.lua line 343

# Methods

# fromFile

Signature cp.nib.archiver.fromFile(filename) -> table | nil, string
Type Method
Description Attempts to read the specified filename and unarchives it into a table, if it is a valid NIBArchive.
  • filename - The string of the file to read.
  • A table containing the archive data, or nil if the file could not be read.
  • The string error message, if any.
Notes None
Examples None
Source src/extensions/cp/nib/archiver.lua line 381