Package org.syncany.chunk

Examples of org.syncany.chunk.TttdChunker$TTTDEnumeration


  @Test
  public void testStringSerialization() {
    final int CHUNK_SIZE = 512*1024;
   
    Chunker chunker = new TttdChunker(CHUNK_SIZE);
    assertEquals("Other toString() result expected.", "TTTD-"+CHUNK_SIZE+"-"+TttdChunker.DEFAULT_DIGEST_ALG+"-"+TttdChunker.DEFAULT_FINGERPRINT_ALG, chunker.toString());
  }
View Full Code Here


    File inputRandom5MBFile = TestFileUtil.createRandomFileInDirectory(tempDir, TOTAL_FILE_SIZE);
   
    File outputCopyOfRandom5MBFile = TestFileUtil.getRandomFilenameInDirectory(tempDir);
    FileOutputStream outputCopyOfRandom5MBFileOutputStream = new FileOutputStream(outputCopyOfRandom5MBFile);
   
    Chunker chunker = new TttdChunker(AVG_CHUNK_SIZE);
   
    // Create chunks
    Enumeration<Chunk> chunkEnumeration = chunker.createChunks(inputRandom5MBFile);
    Chunk lastChunk = null;
   
    while (chunkEnumeration.hasMoreElements()) {
      lastChunk = chunkEnumeration.nextElement();
     
View Full Code Here

    final int TOTAL_FILE_SIZE = 5*1024;
    final int CHUNK_SIZE = 512*1024;
   
    // Setup       
    File inputFile = TestFileUtil.createRandomFileInDirectory(tempDir, TOTAL_FILE_SIZE);   
    Chunker chunker = new TttdChunker(CHUNK_SIZE);
   
    // Create chunks
    Enumeration<Chunk> chunkEnumeration = chunker.createChunks(inputFile);
   
    while (chunkEnumeration.hasMoreElements()) {
      chunkEnumeration.nextElement();
    }
   
View Full Code Here

    for (int i = 0; i < chunkSizes.length; i++) {
      for (int j = 0; j < digestAlgs.length; j++) {
        //chunkers.add(new FixedOffsetChunker(chunkSizes[i], digestAlgs[j]));

        for (int k = 0; k < fingerprinters.length; k++) {
          chunkers.add(new TttdChunker(chunkSizes[i], TttdChunker.DEFAULT_WINDOW_SIZE, digestAlgs[j], fingerprinters[k]));
        }
      }
    }

    // Compression/Encryption
View Full Code Here

TOP

Related Classes of org.syncany.chunk.TttdChunker$TTTDEnumeration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.