Changeset 79


Ignore:
Timestamp:
05/03/10 07:32:23 (4 years ago)
Author:
faltet
Message:

Internal format version bumped to 2.

This is in order to allow an easy way to indicate that a buffer is being
saved uncompressed. This is not supported yet, but it might be in the
future.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/RELEASE_NOTES.txt

    r78 r79  
    99Changes from 0.8.0 to 0.9 
    1010========================= 
     11 
     12- Internal format version bumped to 2 in order to allow an easy way to 
     13  indicate that a buffer is being saved uncompressed.  This is not 
     14  supported yet, but it might be in the future. 
    1115 
    1216- Blosc can use threads now for leveraging the increasing number of 
  • trunk/src/blosc.c

    r77 r79  
    3333 
    3434/* Maximum typesize before considering buffer as a stream of bytes. */ 
    35 #define MAX_TYPESIZE 256         /* Cannot be larger than 256 */ 
     35#define MAX_TYPESIZE 255         /* Cannot be larger than 255 */ 
    3636 
    3737/* The maximum number of splits in a block for compression */ 
     
    501501 
    502502  /* Check typesize limits */ 
    503   if (typesize == MAX_TYPESIZE) { 
    504     typesize = 0;               /* zero means MAX_TYPESIZE */ 
    505   } 
    506   else if (typesize > MAX_TYPESIZE) { 
     503  if (typesize > MAX_TYPESIZE) { 
    507504    /* If typesize is too large, treat buffer as an 1-byte stream. */ 
    508505    typesize = 1; 
     
    591588  _src += sizeof(int)*nblocks; 
    592589 
    593   /* Check zero typesizes */ 
    594   if (typesize == 0) { 
    595     typesize = MAX_TYPESIZE; 
     590  /* Check zero typesizes.  From Blosc version format 2 on, this value 
     591   has been reserved for future use (most probably to indicate 
     592   uncompressible buffers). */ 
     593  if ((version == 1) && (typesize == 0)) { 
     594    typesize = 256;             /* 0 means 256 in format version 1 */ 
    596595  } 
    597596 
  • trunk/src/blosc.h

    r77 r79  
    1717 
    1818#define BLOSC_VERSION_STRING   "0.9.0.dev"  /* string version.  Sync with above! */ 
    19 #define BLOSC_VERSION_DATE     "2010-03-30"      /* date version */ 
     19#define BLOSC_VERSION_DATE     "2010-05-03"      /* date version */ 
    2020 
    2121/* The *_VERS_FORMAT should be just 1-byte long */ 
    22 #define BLOSC_VERSION_FORMAT    1   /* Blosc format version, starting at 1 */ 
     22#define BLOSC_VERSION_FORMAT    2   /* Blosc format version, starting at 1 */ 
    2323#define BLOSCLZ_VERSION_FORMAT  1   /* Blosclz format version, starting at 1 */ 
    2424 
Note: See TracChangeset for help on using the changeset viewer.