Module: RBzip2::FFI

Extended by:
Adapter
Defined in:
lib/facter/util/rbzip2-0.3.0/lib/rbzip2/ffi/errors.rb,
lib/facter/util/rbzip2-0.3.0/lib/rbzip2/ffi.rb,
lib/facter/util/rbzip2-0.3.0/lib/rbzip2/ffi/constants.rb

Overview

This code is free software; you can redistribute it and/or modify it under the terms of the new BSD License.

Copyright © 2013, Brian Lopez Copyright © 2013, Sebastian Staudt

Defined Under Namespace

Classes: BufferError, Compressor, ConfigError, CorruptError, Decompressor, Error

Constant Summary collapse

DEFAULT_BLK_SIZE =
3
BZ_RUN =
0
BZ_FLUSH =
1
BZ_FINISH =
2
BZ_OK =
0
BZ_RUN_OK =
1
BZ_FLUSH_OK =
2
BZ_FINISH_OK =
3
BZ_STREAM_END =
4
BZ_SEQUENCE_ERROR =
-1
BZ_PARAM_ERROR =
-2
BZ_MEM_ERROR =
-3
BZ_DATA_ERROR =
-4
BZ_DATA_ERROR_MAGIC =
-5
BZ_IO_ERROR =
-6
BZ_UNEXPECTED_EOF =
-7
BZ_OUTBUFF_FULL =
-8
BZ_CONFIG_ERROR =
-9

Class Method Summary collapse

Methods included from Adapter

available?, extended

Class Method Details

.initObject



13
14
15
16
17
18
19
20
# File 'lib/facter/util/rbzip2-0.3.0/lib/rbzip2/ffi.rb', line 13

def self.init
  begin
    extend ::FFI::Library
    ffi_lib ['bz2', 'libbz2.so.1', 'libbz2.dll']   #####  'bz2'        #### Modded by Sooyean.. TODO: Need to be reviewed later... as this is not from default gems
  rescue NameError, LoadError
    @@available = false
  end
end