# Path: ship/utils/dbfread/memo.py
# class BinaryMemo(VFPMemo):
#     pass


import sys
import datetime
import struct
from decimal import Decimal
from .memo import BinaryMemo
        return Decimal(value) / 10000

    def parseB(self, field, data):
        """Binary memo field or double precision floating point number

        dBase uses B to represent a memo index (10 bytes), while
        Visual FoxPro uses it to store a double precision floating
        point number (8 bytes).
        """
        if self.dbversion in [0x30, 0x31, 0x32]:
            return struct.unpack('d', data)[0]
        else:
            return self.get_memo(self._parse_memo_index(data))

    def parseG(self, field, data):
        """OLE Object stored in memofile.

        The raw data is returned as a binary string."""
        return self.get_memo(self._parse_memo_index(data))

    def parseP(self, field, data):
        """Picture stored in memofile.

        The raw data is returned as a binary string."""
        return self.get_memo(self._parse_memo_index(data))

    # Autoincrement field ('+')
    parse2B = parseI

    # Timestamp field ('@')

# Path: ship/utils/dbfread/memo.py
# class BinaryMemo(VFPMemo):
#     pass


# Path: ship/utils/dbfread/field_parser.py
import sys
import datetime
import struct
from decimal import Decimal
from .memo import BinaryMemo

        return Decimal(value) / 10000

    def parseB(self, field, data):
        """Binary memo field or double precision floating point number

        dBase uses B to represent a memo index (10 bytes), while
        Visual FoxPro uses it to store a double precision floating
        point number (8 bytes).
        """
        if self.dbversion in [0x30, 0x31, 0x32]:
            return struct.unpack('d', data)[0]
        else:
            return self.get_memo(self._parse_memo_index(data))

    def parseG(self, field, data):
        """OLE Object stored in memofile.

        The raw data is returned as a binary string."""
        return self.get_memo(self._parse_memo_index(data))

    def parseP(self, field, data):
        """Picture stored in memofile.

        The raw data is returned as a binary string."""
        return self.get_memo(self._parse_memo_index(data))

    # Autoincrement field ('+')
    parse2B = parseI

    # Timestamp field ('@')

    parse40 = parseT