Esempio n. 1
0
        private void ModifyTestData(int iterration)
        {
            FileStream fs = new FileStream(TestFileName(), FileMode.Open);
            IndexedFile.IndexedFile file = new IndexedFile.IndexedFile(fs, 256, true);

            for (int i = 0; i < nrItems; i++)
            {
                byte[] buffer = new byte[i + iterration];
                for (int j = 0; j < buffer.Length; j++)
                    buffer[j] = (byte)(j % (1+iterration % 3));
                file.Write(keys[i], buffer, 0, buffer.Length);
            }

            file.Dispose();
            fs.Close();
        }
Esempio n. 2
0
        private void ModifyTestData(int iterration)
        {
            FileStream fs = new FileStream(TestFileName(), FileMode.Open);

            IndexedFile.IndexedFile file = new IndexedFile.IndexedFile(fs, 256, true);

            for (int i = 0; i < nrItems; i++)
            {
                byte[] buffer = new byte[i + iterration];
                for (int j = 0; j < buffer.Length; j++)
                {
                    buffer[j] = (byte)(j % (1 + iterration % 3));
                }
                file.Write(keys[i], buffer, 0, buffer.Length);
            }

            file.Dispose();
            fs.Close();
        }
Esempio n. 3
0
        private void WriteTestData()
        {
            FileStream fs = new FileStream(TestFileName(), FileMode.Create);

            IndexedFile.IndexedFile file = new IndexedFile.IndexedFile(fs, 256, true);

            for (int i = 0; i < nrItems; i++)
            {
                byte[] buffer = new byte[i];
                for (int j = 0; j < buffer.Length; j++)
                {
                    buffer[j] = (byte)(j % 256);
                }
                file.Write(keys[i], buffer, 0, buffer.Length);
            }

            file.Dispose();
            fs.Close();
        }
Esempio n. 4
0
        private void WriteTestData()
        {
            FileStream fs = new FileStream(TestFileName(), FileMode.Create);
            IndexedFile.IndexedFile file = new IndexedFile.IndexedFile(fs, 256, true);

            for (int i = 0; i < nrItems; i++)
            {
                byte[] buffer = new byte[i];
                for (int j = 0; j < buffer.Length; j++)
                    buffer[j] = (byte)(j % 256);
                file.Write(keys[i], buffer, 0, buffer.Length);
            }

            file.Dispose();
            fs.Close();
        }