lib/perobs/FlatFileBlobHeader.rb in perobs-3.0.2 vs lib/perobs/FlatFileBlobHeader.rb in perobs-4.0.0
- old
+ new
@@ -31,11 +31,11 @@
# The FlatFile blob header has the following structure:
#
# 1 Byte: Flags byte.
# Bit 0: 0 deleted entry, 1 valid entry
- # Bit 1: 0 unmarked, 1 marked
+ # Bit 1: 0 reserved, must be 0
# Bit 2: 0 uncompressed data, 1 compressed data
# Bit 3: 0 current entry, 1 outdated entry
# Bit 4 - 7: reserved, must be 0
# 8 bytes: Length of the data blob in bytes
# 8 bytes: ID of the value in the data blob
@@ -48,11 +48,10 @@
# The 'pack()' format of the header.
FORMAT = 'CQQL'
# The length of the header in bytes.
LENGTH = 21
VALID_FLAG_BIT = 0
- MARK_FLAG_BIT = 1
COMPRESSED_FLAG_BIT = 2
OUTDATED_FLAG_BIT = 3
attr_reader :addr, :flags, :length, :id, :crc
@@ -144,26 +143,9 @@
end
# Return true if the header is for a non-empty blob.
def is_valid?
bit_set?(VALID_FLAG_BIT)
- end
-
- # Return true if the blob has been marked.
- def is_marked?
- bit_set?(MARK_FLAG_BIT)
- end
-
- # Set the mark bit.
- def set_mark_flag
- set_flag(MARK_FLAG_BIT)
- write_flags
- end
-
- # Clear the mark bit.
- def clear_mark_flag
- clear_flag(MARK_FLAG_BIT)
- write_flags
end
# Return true if the blob contains compressed data.
def is_compressed?
bit_set?(COMPRESSED_FLAG_BIT)