1/*
2 * stream.h
3 *
4 * Copyright (C) 2012-2014 Aerospike, Inc.
5 *
6 * Portions may be licensed to Aerospike, Inc. under one or more contributor
7 * license agreements.
8 *
9 * This program is free software: you can redistribute it and/or modify it under
10 * the terms of the GNU Affero General Public License as published by the Free
11 * Software Foundation, either version 3 of the License, or (at your option) any
12 * later version.
13 *
14 * This program is distributed in the hope that it will be useful, but WITHOUT
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
17 * details.
18 *
19 * You should have received a copy of the GNU Affero General Public License
20 * along with this program. If not, see http://www.gnu.org/licenses/
21 */
22/*
23 * This file implements stream parsing for rows
24 */
25
26#pragma once
27
28#include "ai_obj.h"
29#include "bt.h"
30
31int u160Cmp (void *s1, void *s2);
32int llCmp (void *s1, void *s2);
33int ylCmp (void *s1, void *s2);
34
35char *createBTKey(ai_obj *key, bool *med, uint32 *ksize, bt *btr, btk_t *btk);
36void destroyBTKey(char *btkey, bool med);
37
38void convertStream2Key(uchar *stream, ai_obj *key, bt *btr);
39uchar *parseStream(uchar *stream, bt *btr);
40void *createStream(bt *btr, void *val, char *btkey, uint32 klen, uint32 *ssize, crs_t *crs);
41bool destroyStream(bt *btr, uchar *ostream);
42