lib/macho/macho_file.rb
# Read a compressed Mach-O header and check its validity, as well as whether we're able
# to parse it.
# @return [void]
# @raise [CompressedMachOError] if we weren't asked to perform decompression
# @raise [DecompressionError] if decompression is impossible or fails
# @api private
Read a compressed Mach-O header and check its validity, as well as whether we're able
to parse it.
Read a compressed Mach - O header and check its validity as well as whether we ' re able to parse it .
def populate_prelinked_kernel_header
      raise CompressedMachOError unless options.fetch(:decompress, false)
      @plh = Headers::PrelinkedKernelHeader.new_from_bin :big, @raw_data[0, Headers::PrelinkedKernelHeader.bytesize]
      raise DecompressionError, "unsupported compression type: LZSS" if @plh.lzss?
      raise DecompressionError, "unknown compression type: 0x#{plh.compress_type.to_s 16}" unless @plh.lzvn?
      decompress_macho_lzvn
    end
def populate_prelinked_kernel_header raise CompressedMachOError unless options . fetch ( :decompress , false ) @plh = Headers :: PrelinkedKernelHeader . new_from_bin :big , @raw_data [ 0 , Headers :: PrelinkedKernelHeader . bytesize ] raise DecompressionError , "unsupported compression type: LZSS" if @plh . lzss? raise DecompressionError , "unknown compression type: 0x#{plh.compress_type.to_s 16}" unless @plh . lzvn? decompress_macho_lzvn end
Read a compressed Mach-O header and check its validity, as well as whether we're able
to parse it.
Read a compressed Mach - O header and check its validity as well as whether we ' re able to parse it .
None
void
[CompressedMachOError] if we weren't asked to perform decompression
[ CompressedMachOError ] if we weren ' t asked to perform decompression
[DecompressionError] if decompression is impossible or fails
[ DecompressionError ] if decompression is impossible or fails
api
None