Module Tins::FileBinary
In: lib/tins/file_binary.rb
lib/tins/file_binary.rb

Methods

ascii?   ascii?   binary?   binary?   included   included  

Classes and Modules

Module Tins::FileBinary::ClassMethods
Module Tins::FileBinary::Constants

Attributes

default_options  [RW]  Default options can be queried/set via this hash.
default_options  [RW]  Default options can be queried/set via this hash.

Public Class methods

Public Instance methods

Returns true if FileBinary#binary? returns false, false if FileBinary#binary? returns true, and nil otherwise. For an explanation of options, see FileBinary#binary?.

Returns true if FileBinary#binary? returns false, false if FileBinary#binary? returns true, and nil otherwise. For an explanation of options, see FileBinary#binary?.

Returns true if this file is considered to be binary, false if it is not considered to be binary, and nil if it was empty.

A file is considered to be binary if the percentage of zeros exceeds options[:percentage_zeros] or the percentage of binary bytes (8-th bit is 1) exceeds options[:percentage_binary] in the buffer of size options[:buffer_size] that is checked (beginning from offset options[:offset]). If an option isn‘t given the one from FileBinary.default_options is used instead.

Returns true if this file is considered to be binary, false if it is not considered to be binary, and nil if it was empty.

A file is considered to be binary if the percentage of zeros exceeds options[:percentage_zeros] or the percentage of binary bytes (8-th bit is 1) exceeds options[:percentage_binary] in the buffer of size options[:buffer_size] that is checked (beginning from offset options[:offset]). If an option isn‘t given the one from FileBinary.default_options is used instead.

[Validate]