# File lib/native_file_types/apple2/PackedHiResPicFormats.rb, line 74 def unpacked_picture_bytes packed_buffer=data_without_header unpacked_buffer="\000"*8192 in_p=0 out_p=0 while out_p<=8192 && in_p<packed_buffer.length do count_byte=packed_buffer[in_p] in_p+=1 if (count_byte>=0x80) then (1+(count_byte & 0x7F)).times do unpacked_buffer[out_p]=packed_buffer[in_p] unless out_p>=8192 in_p+=1 out_p+=1 end else src_byte=packed_buffer[in_p] in_p+=1 (1+count_byte).times do unpacked_buffer[out_p]=src_byte unless out_p>=8192 out_p+=1 end end end unpacked_buffer end