/**
 * @title BlobStore
 * @author Jonathan Brown <jbrown@bluedroplet.com>
 */
contract BlobStore {

    mapping (bytes32 => bool) stored;

    event logBlob(bytes32 indexed hash, bytes blob) anonymous;

    function isStored(bytes32 hash) constant returns (bool) {
        return stored[hash];
    }

    function storeBlob(bytes blob) returns (bytes32 hash) {
        hash = sha3(blob);
        if (!isStored(hash)) {
            logBlob(hash, blob);
            stored[hash] = true;
        }
    }

}


Store the block number the blob is logged in in contract state.
/**
 * @title BlobStore
 * @author Jonathan Brown <jbrown@bluedroplet.com>
 */
contract BlobStore {

    mapping (bytes32 => uint) blobBlock;

    event logBlob(bytes32 indexed hash, bytes blob) anonymous;

    function getBlobBlock(bytes32 hash) constant returns (uint) {
        return blobBlock[hash];
    }

    function storeBlob(bytes blob) returns (bytes32 hash) {
        hash = sha3(blob);
        if (blobBlock[hash] != 0) {
            logBlob(hash, blob);
            blobBlock[hash] = block.number;
        }
    }

}