Sha256: 51e3081ae465cd3f603d110bb77a9d43a8b196a862f93f434720ed9df8a00360

Contents?: true

Size: 1.92 KB

Versions: 11

Compression:

Stored size: 1.92 KB

Contents

module LibMsPack
    module MsSzdd
        module Constants
            MSSZDDC_PARAM_MISSINGCHAR = 0
            MSSZDD_FMT_NORMAL = 0
            MSSZDD_FMT_QBASIC = 1
        end

        class MsSzdddHeader < FFI::Struct
            layout({
                :format => :int,
                :length => :off_t,
                :missing_char => :char
            })

            def format
                self[:format]
            end

            def length
                self[:length]
            end

            def missing_char
                self[:missing_char]
            end
        end

        class MsSzddCompressor < FFI::Struct
            layout({
                :compress => callback([ :pointer, :string, :string, :off_t ], :int),
                :set_param => callback([ :pointer, :int, :uint ], :int),
                :last_error => callback([ :pointer ], :int)
            })

            def compress
                self[:compress]
            end

            def set_param
                self[:set_param]
            end

            def last_error
                self[:last_error]
            end

        end

        class MsSzddDecompressor < FFI::Struct
            layout({
                :open => callback([ :pointer, :string ], :pointer),
                :close => callback([ :pointer, :pointer ], :void),
                :extract => callback([ :pointer, :pointer, :string ], :int),
                :decompress => callback([ :pointer, :string, :string ], :int),
                :last_error => callback([ :pointer ], :int)
            })

            def open
                self[:open]
            end

            def close
                self[:close]
            end

            def extract
                self[:extract]
            end

            def decompress
                self[:decompress]
            end

            def last_error
                self[:last_error]
            end

        end
    end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
libmspack-0.11.0 lib/libmspack/msszdd.rb
libmspack-0.10.1.2 lib/libmspack/msszdd.rb
libmspack-0.10.1 lib/libmspack/msszdd.rb
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/libmspack-0.1.0/lib/libmspack/msszdd.rb
metanorma-cli-1.3.3.1 gems/ruby/2.6.0/gems/libmspack-0.1.0/lib/libmspack/msszdd.rb
libmspack-0.1.0 lib/libmspack/msszdd.rb
libmspack-0.0.5 lib/libmspack/msszdd.rb
libmspack-0.0.4 lib/libmspack/msszdd.rb
libmspack-0.0.3 lib/libmspack/msszdd.rb
libmspack-0.0.2 lib/libmspack/msszdd.rb
libmspack-0.0.1 lib/libmspack/msszdd.rb