[EMAIL PROTECTED] wrote:
Also, please have a more sensible API than Onion Networks' stuff
Well, I'm open for ideas and suggestions!  The mailing list name is
onlinecodes-devl ;)

Well, the list doesn't appear to have been created yet - so:


I see little-reason that it need be any more complicated than:

public Class RatelessEncoder {
  public RatelessEncoder(ByteBuffer data, int segmentSize) { ... }

  public Iterator segmentIterator() { ... }
}

and:

public Class RatelessDecoder {
  /**
   * @param segments A list of collected segments
   * @param destination The ByteBuffer into which the decoded
   *                    data should be written
   **/
  public static void decode(LinkedList segments, ByteBuffer
                              destination);
}


One last thing would be to make it transparently handle a situation where the length of the data was not a multiple of the segment
length.


Ian.
_______________________________________________
Devl mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/devl

Reply via email to