def each_object(compressed: false, recursive: false, &block)
            return enum_for(__method__, compressed: compressed,
                                        recursive: recursive
                           ) unless block_given?

            @revisions.each do |revision|
                revision.each_object do |object|
                    block.call(object)

                    walk_object(object, &block) if recursive

                    if object.is_a?(ObjectStream) and compressed
                        object.each do |child_obj|
                            block.call(child_obj)

                            walk_object(child_obj) if recursive
                        end
                    end
                end
            end
        end
def each_object(compressed: false, recursive: false, &block)
            return enum_for(__method__, compressed: compressed,
                                        recursive: recursive
                           ) unless block_given?

            @revisions.each do |revision|
                revision.each_object do |object|
                    block.call(object)

                    walk_object(object, &block) if recursive

                    if object.is_a?(ObjectStream) and compressed
                        object.each do |child_obj|
                            block.call(child_obj)

                            walk_object(child_obj) if recursive
                        end
                    end
                end
            end
        end
Iterates over the objects of the document.
 _compressed_: iterates over the objects inside object streams.
 _recursive_: iterates recursively inside objects like arrays and dictionaries.